class HavePublicInstanceMethodMatcher

Public Instance Methods

failure_message() click to toggle source
# File lib/mspec/matchers/have_public_instance_method.rb, line 9
def failure_message
  ["Expected #{@mod} to have public instance method '#{@method.to_s}'",
   "but it does not"]
end
matches?(mod) click to toggle source
# File lib/mspec/matchers/have_public_instance_method.rb, line 4
def matches?(mod)
  @mod = mod
  mod.public_instance_methods(@include_super).include? @method
end
negative_failure_message() click to toggle source
# File lib/mspec/matchers/have_public_instance_method.rb, line 14
def negative_failure_message
  ["Expected #{@mod} NOT to have public instance method '#{@method.to_s}'",
   "but it does"]
end