diff --git a/spec/rspec/mocks/double_spec.rb b/spec/rspec/mocks/double_spec.rb index baae8e1ee..824b04701 100644 --- a/spec/rspec/mocks/double_spec.rb +++ b/spec/rspec/mocks/double_spec.rb @@ -591,9 +591,9 @@ def initialize(amount, units) end it "fails when calling yielding method consecutively with wrong arity" do - expect(@double).to receive(:yield_back).once.with(no_args()).once.and_yield('wha', 'zup'). - and_yield('down'). - and_yield(14, 65) + expect(@double).to receive(:yield_back).once.with(no_args()).and_yield('wha', 'zup'). + and_yield('down'). + and_yield(14, 65) expect { c = [] @double.yield_back {|a,b| c << [a, b]}