class HaveSingletonMethodMatcher
Public Instance Methods
failure_message()
click to toggle source
# File lib/mspec/matchers/have_singleton_method.rb, line 9 def failure_message ["Expected #{@obj} to have singleton method '#{@method.to_s}'", "but it does not"] end
matches?(obj)
click to toggle source
# File lib/mspec/matchers/have_singleton_method.rb, line 4 def matches?(obj) @obj = obj obj.singleton_methods(@include_super).include? @method end
negative_failure_message()
click to toggle source
# File lib/mspec/matchers/have_singleton_method.rb, line 14 def negative_failure_message ["Expected #{@obj} NOT to have singleton method '#{@method.to_s}'", "but it does"] end