From 1e714926f4059b6fc817c6977986472399777c2c Mon Sep 17 00:00:00 2001 From: Benjamin Quorning Date: Thu, 4 Jul 2024 22:48:09 +0200 Subject: [PATCH] Fix failing tests --- quickdraw/helpers/grab.test.rb | 6 +++--- quickdraw/helpers/mix.test.rb | 9 ++++----- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/quickdraw/helpers/grab.test.rb b/quickdraw/helpers/grab.test.rb index 69451114..620fb4d5 100644 --- a/quickdraw/helpers/grab.test.rb +++ b/quickdraw/helpers/grab.test.rb @@ -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 diff --git a/quickdraw/helpers/mix.test.rb b/quickdraw/helpers/mix.test.rb index 7f6856fe..3c6f54c6 100644 --- a/quickdraw/helpers/mix.test.rb +++ b/quickdraw/helpers/mix.test.rb @@ -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"] }) @@ -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"] }) @@ -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"] }) @@ -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" })