Parent

Included Modules

Class/Module Index [+]

Quicksearch

RSpec::Matchers::BuiltIn::Has

@api private Provides the implementation for `has_<predicate>`. Not intended to be instantiated directly.

Public Class Methods

new(method_name, *args, &block) click to toggle source
# File lib/rspec/matchers/built_in/has.rb, line 10
def initialize(method_name, *args, &block)
  @method_name, @args, @block = method_name, args, block
end

Public Instance Methods

description() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/has.rb, line 42
def description
  [method_description, args_description].compact.join(' ')
end
does_not_match?(actual, &block) click to toggle source

@private

# File lib/rspec/matchers/built_in/has.rb, line 22
def does_not_match?(actual, &block)
  @actual = actual
  @block ||= block
  predicate_accessible? && !predicate_matches?
end
failure_message() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/has.rb, line 30
def failure_message
  validity_message || "expected ##{predicate}#{failure_message_args_description} to return true, got false"
end
failure_message_when_negated() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/has.rb, line 36
def failure_message_when_negated
  validity_message || "expected ##{predicate}#{failure_message_args_description} to return false, got true"
end
matches?(actual, &block) click to toggle source

@private

# File lib/rspec/matchers/built_in/has.rb, line 15
def matches?(actual, &block)
  @actual = actual
  @block ||= block
  predicate_accessible? && predicate_matches?
end
supports_block_expectations?() click to toggle source

@private

# File lib/rspec/matchers/built_in/has.rb, line 47
def supports_block_expectations?
  false
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.