Skip to content

Commit

Permalink
refactor for formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed May 26, 2013
1 parent 77fa7a8 commit 15a0651
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/rspec/mocks/method_double.rb
Expand Up @@ -40,14 +40,12 @@ def visibility
end
end

class ProcWithBlock
def initialize(object,method)
@object, @method = object, method
end
class ProcWithBlock < Struct.new(:object, :method_name)

def call(*args,&block)
@object.__send__(:method_missing, @method, *args, &block)
def call(*args, &block)
self.object.__send__(:method_missing, self.method_name, *args, &block)
end

end

# @private
Expand Down

0 comments on commit 15a0651

Please sign in to comment.