Skip to content

Commit

Permalink
switch from for..in to each
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Aug 20, 2013
1 parent c24e684 commit 9141d6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/mocks/any_instance/recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def unstub(method_name)
raise RSpec::Mocks::MockExpectationError, "The method `#{method_name}` was not stubbed or was already unstubbed"
end
message_chains.remove_stub_chains_for!(method_name)
for proxy in ::RSpec::Mocks.proxies_of(@klass)
::RSpec::Mocks.proxies_of(@klass).each do |proxy|
stubs[method_name].each { |stub| proxy.remove_single_stub(method_name, stub) }
end
stubs[method_name].clear
Expand Down

0 comments on commit 9141d6c

Please sign in to comment.