spec/bogus/stubbing/interaction_spec.rb in bogus-0.1.5 vs spec/bogus/stubbing/interaction_spec.rb in bogus-0.1.6

- old
+ new

@@ -50,42 +50,42 @@ same.each do |first_interaction, second_interaction| it "returns true for #{first_interaction.inspect} and #{second_interaction.inspect}" do first = create_interaction(first_interaction) second = create_interaction(second_interaction) - expect(Interaction.same?(recorded: first, stubbed: second)).to be_true + expect(Interaction.same?(recorded: first, stubbed: second)).to be(true) end end different.each do |first_interaction, second_interaction| it "returns false for #{first_interaction.inspect} and #{second_interaction.inspect}" do first = create_interaction(first_interaction) second = create_interaction(second_interaction) - expect(Interaction.same?(recorded: first, stubbed: second)).to be_false + expect(Interaction.same?(recorded: first, stubbed: second)).to be(false) end end it "differs exceptions from empty return values" do first = Interaction.new(:foo, [:bar]) { raise SomeError } second = Interaction.new(:foo, [:bar]) { nil } - expect(Interaction.same?(recorded: first, stubbed: second)).to be_false + expect(Interaction.same?(recorded: first, stubbed: second)).to be(false) end it "differs raised exceptions from ones just returned from the block" do first = Interaction.new(:foo, [:bar]) { raise SomeError } second = Interaction.new(:foo, [:bar]) { SomeError } - expect(Interaction.same?(recorded: first, stubbed: second)).to be_false + expect(Interaction.same?(recorded: first, stubbed: second)).to be(false) end it "considers exceptions of the same type as equal" do first = Interaction.new(:foo, [:bar]) { raise SomeError } second = Interaction.new(:foo, [:bar]) { raise SomeError } - expect(Interaction.same?(recorded: first, stubbed: second)).to be_true + expect(Interaction.same?(recorded: first, stubbed: second)).to be(true) end context 'when comparing arguments with custom #== implementations' do Dev = Struct.new(:login) do def ==(other) @@ -95,17 +95,17 @@ it "considers two interactions == when the arguments are ==" do first = Interaction.new(:with, [Dev.new(:psyho)]) second = Interaction.new(:with, [Dev.new(:psyho)]) - expect(Interaction.same?(recorded: first, stubbed: second)).to be_true + expect(Interaction.same?(recorded: first, stubbed: second)).to be(true) end it "considers two interactions != when the arguments are !=" do first = Interaction.new(:with, [Dev.new(:wrozka)]) second = Interaction.new(:with, [Dev.new(:yundt)]) - expect(Interaction.same?(recorded: first, stubbed: second)).to be_false + expect(Interaction.same?(recorded: first, stubbed: second)).to be(false) end end end end