Skip to content

Commit

Permalink
reduce warnings generated by rspec-mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jul 2, 2011
1 parent aca59bc commit f04b8bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions lib/rspec/mocks/any_instance/chain.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ def #{method_name}(*args, &block)
end

def playback!(instance)
messages.inject(instance) do |instance, message|
instance.send(*message.first, &message.last)
messages.inject(instance) do |_instance, message|
_instance.send(*message.first, &message.last)
end
end

Expand Down Expand Up @@ -46,4 +46,4 @@ def record(rspec_method_name, *args, &block)
end
end
end
end
end
3 changes: 2 additions & 1 deletion lib/rspec/mocks/any_instance/recorder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ def build_alias_method_name(method_name)
def restore_original_method!(method_name)
alias_method_name = build_alias_method_name(method_name)
@klass.class_eval do
remove_method method_name
alias_method method_name, alias_method_name
remove_method alias_method_name
end
Expand Down Expand Up @@ -135,4 +136,4 @@ def #{method_name}(*args, &blk)
end
end
end
end
end

0 comments on commit f04b8bb

Please sign in to comment.