Parent

Included Modules

Class/Module Index [+]

Quicksearch

RSpec::Matchers::BuiltIn::Satisfy

@api private Provides the implementation for `satisfy`. Not intended to be instantiated directly.

Public Class Methods

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

Public Instance Methods

description() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/satisfy.rb, line 35
def description
  "satisfy block"
end
failure_message() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/satisfy.rb, line 23
def failure_message
  "expected #{@actual} to satisfy block"
end
failure_message_when_negated() click to toggle source

@api private @return [String]

# File lib/rspec/matchers/built_in/satisfy.rb, line 29
def failure_message_when_negated
  "expected #{@actual} not to satisfy block"
end
matches?(actual, &block) click to toggle source

@private

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

@private

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

[Validate]

Generated with the Darkfish Rdoc Generator 2.