Class/Module Index [+]

Quicksearch

RSpec::Matchers::BuiltIn::BePredicate

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

Public Class Methods

new(*args, &block) click to toggle source
# File lib/rspec/matchers/built_in/be.rb, line 179
def initialize(*args, &block)
  @expected = parse_expected(args.shift)
  @args = args
  @block = block
end

Public Instance Methods

description() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/be.rb, line 211
def description
  "#{prefix_to_sentence}#{expected_to_sentence}#{args_to_sentence}"
end
does_not_match?(actual, &block) click to toggle source
# File lib/rspec/matchers/built_in/be.rb, line 191
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/be.rb, line 199
def failure_message
  failure_message_expecting(true)
end
failure_message_when_negated() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/be.rb, line 205
def failure_message_when_negated
  failure_message_expecting(false)
end
matches?(actual, &block) click to toggle source
# File lib/rspec/matchers/built_in/be.rb, line 185
def matches?(actual, &block)
  @actual  = actual
  @block ||= block
  predicate_accessible? && predicate_matches?
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.