From 1e7e31ff972bb65bc88cfad7f031626e86f75323 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Sat, 12 Mar 2022 15:52:48 -0700 Subject: [PATCH] Use true instead of false It's more obvious the stub worked when same? reports true for different objects. --- spec/spectator/mocks/double_spec.cr | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spec/spectator/mocks/double_spec.cr b/spec/spectator/mocks/double_spec.cr index ae882d4..3f4f9c6 100644 --- a/spec/spectator/mocks/double_spec.cr +++ b/spec/spectator/mocks/double_spec.cr @@ -73,7 +73,7 @@ Spectator.describe Spectator::Double do Spectator::ValueStub.new(:to_yaml, "to_yaml"), Spectator::ValueStub.new(:try, "try"), Spectator::ValueStub.new(:object_id, 42_u64), - Spectator::ValueStub.new(:"same?", false), + Spectator::ValueStub.new(:"same?", true), ] of Spectator::Stub) end @@ -101,8 +101,8 @@ Spectator.describe Spectator::Double do expect(dbl.to_yaml).to eq("to_yaml") expect(dbl.try { nil }).to eq("try") expect(dbl.object_id).to eq(42_u64) - expect(dbl.same?(dbl)).to eq(false) - expect(dbl.same?(nil)).to eq(false) + expect(dbl.same?(dbl)).to eq(true) + expect(dbl.same?(nil)).to eq(true) end end