Class: Mocha::MethodMatcher
Instance Attribute Summary collapse
-
#expected_method_name ⇒ Object
readonly
Returns the value of attribute expected_method_name.
Instance Method Summary collapse
-
#initialize(expected_method_name) ⇒ MethodMatcher
constructor
A new instance of MethodMatcher.
- #match?(actual_method_name) ⇒ Boolean
- #mocha_inspect ⇒ Object
Constructor Details
#initialize(expected_method_name) ⇒ MethodMatcher
Returns a new instance of MethodMatcher.
7 8 9 |
# File 'lib/mocha/method_matcher.rb', line 7 def initialize(expected_method_name) @expected_method_name = expected_method_name end |
Instance Attribute Details
#expected_method_name ⇒ Object (readonly)
Returns the value of attribute expected_method_name.
5 6 7 |
# File 'lib/mocha/method_matcher.rb', line 5 def expected_method_name @expected_method_name end |
Instance Method Details
#match?(actual_method_name) ⇒ Boolean
11 12 13 |
# File 'lib/mocha/method_matcher.rb', line 11 def match?(actual_method_name) @expected_method_name == actual_method_name end |
#mocha_inspect ⇒ Object
15 16 17 |
# File 'lib/mocha/method_matcher.rb', line 15 def mocha_inspect "#{@expected_method_name}" end |