Permalink
Browse files

removed unused argument

darcs-hash:20051017223706-9ce57-7072f1494054f47ffe08f219eb28c6f9a4e3cfba.gz
  • Loading branch information...
1 parent a19035a commit 196905e6aeb5878e9bb3cd8549adf5cbbaad7254 Steve committed Oct 17, 2005
Showing with 5 additions and 4 deletions.
  1. +5 −4 rmock.rb
View
@@ -1,5 +1,6 @@
# = RMock - A Mock Object library inspired by JMock
#
+
# Copyright (c) 2005 Steve Purcell
# Licenced under the same terms as Ruby itself
#
@@ -120,11 +121,11 @@ def #{method_name.to_s}(*args, &block)
################################################################################
class CallMatcher
- def initialize(method_name, argspec, response=nil, &listener)
+
+ def initialize(method_name, argspec, &listener)
@method_name = method_name
@argspec = argspec
- @response = response
- @response ||= lambda { }
+ @response = lambda { }
@listener = listener
end
@@ -197,7 +198,7 @@ def teardown
end
def verify_all_mocks
- return unless @mocks
+ return unless instance_variables.include?("@mocks")
@mocks.each do |mock|
mock.verify
end

0 comments on commit 196905e

Please sign in to comment.