Parent

RSpec::Matchers::Has

Public Class Methods

new(expected, *args) click to toggle source
# File lib/rspec/matchers/has.rb, line 4
def initialize(expected, *args)
  @expected, @args = expected, args
end

Public Instance Methods

description() click to toggle source
# File lib/rspec/matchers/has.rb, line 20
def description
  [method_description(@expected), args_description(@args)].compact.join(' ')
end
failure_message_for_should() click to toggle source
# File lib/rspec/matchers/has.rb, line 12
def failure_message_for_should
  "expected ##{predicate(@expected)}(#{@args[0].inspect}) to return true, got false"
end
failure_message_for_should_not() click to toggle source
# File lib/rspec/matchers/has.rb, line 16
def failure_message_for_should_not
  "expected ##{predicate(@expected)}(#{@args[0].inspect}) to return false, got true"
end
matches?(actual) click to toggle source
# File lib/rspec/matchers/has.rb, line 8
def matches?(actual)
  actual.__send__(predicate(@expected), *@args)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.