Class: HaveMethodMatcher
Instance Method Summary
collapse
#initialize
#convert_name
Constructor Details
This class inherits a constructor from MethodMatcher
Instance Method Details
#failure_message ⇒ Object
9
10
11
12
|
# File 'lib/extensions/mspec/mspec/matchers/have_method.rb', line 9
def failure_message
["Expected #{@mod} to have method '#{@method.to_s}'",
"but it does not"]
end
|
#matches?(mod) ⇒ Boolean
4
5
6
7
|
# File 'lib/extensions/mspec/mspec/matchers/have_method.rb', line 4
def matches?(mod)
@mod = mod
@mod.methods(@include_super).include? @method
end
|
#negative_failure_message ⇒ Object
14
15
16
17
|
# File 'lib/extensions/mspec/mspec/matchers/have_method.rb', line 14
def negative_failure_message
["Expected #{@mod} NOT to have method '#{@method.to_s}'",
"but it does"]
end
|