spec/bogus/stubbing/interaction_spec.rb in bogus-0.1.4 vs spec/bogus/stubbing/interaction_spec.rb in bogus-0.1.5
- 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)
- Interaction.same?(recorded: first, stubbed: second).should 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)
- Interaction.same?(recorded: first, stubbed: second).should 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 }
- Interaction.same?(recorded: first, stubbed: second).should 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 }
- Interaction.same?(recorded: first, stubbed: second).should 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 }
- Interaction.same?(recorded: first, stubbed: second).should 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)])
- Interaction.same?(recorded: first, stubbed: second).should 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)])
- Interaction.same?(recorded: first, stubbed: second).should be_false
+ expect(Interaction.same?(recorded: first, stubbed: second)).to be_false
end
end
end
end