Skip to content

Commit

Permalink
Fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bquorning committed Jul 5, 2024
1 parent 662d738 commit 1e71492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions quickdraw/helpers/grab.test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
include Phlex::Helpers

test "supports many bindings" do
output = grab({ class: "foo" }, { if: "bar" })
output = grab(class: "foo", if: "bar")
expect(output) == ["foo", "bar"]
end

test "supports single binding" do
output = grab({ class: "foo" })
expect(output) == ["foo"]
output = grab(class: "foo")
expect(output) == "foo"
end
9 changes: 4 additions & 5 deletions quickdraw/helpers/mix.test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
test "supports mixing between arrays and strings" do
output = mix({ class: ["foo"] }, { class: "bar" })

expect(output)
expect(output) == { class: ["foo", "bar"] }

output = mix({ class: "foo" }, { class: ["bar"] })

Expand All @@ -53,8 +53,7 @@
test "supports mixing between sets and strings" do
output = mix({ class: Set["foo"] }, { class: "bar" })

expect(output)
{ class: Set["foo", "bar"] }
expect(output) == { class: Set["foo", "bar"] }

output = mix({ class: "foo" }, { class: Set["bar"] })

Expand All @@ -64,7 +63,7 @@
test "supports mixing between arrays and sets, keeping the less restrictive type" do
output = mix({ class: ["foo"] }, { class: Set["bar"] })

expect(output)
expect(output) == { class: ["foo", "bar"] }

output = mix({ class: Set["foo"] }, { class: ["bar"] })

Expand All @@ -74,7 +73,7 @@
test "gracefully handles mixing with nils" do
output = mix({ class: "foo" }, { class: nil })

expect(output)
expect(output) == { class: "foo" }

output = mix({ class: nil }, { class: "foo" })

Expand Down

0 comments on commit 1e71492

Please sign in to comment.