class RSpec::Matchers::BuiltIn::Satisfy
Public Class Methods
new(&block)
click to toggle source
# File lib/rspec/matchers/built_in/satisfy.rb, line 5 def initialize(&block) @block = block end
Public Instance Methods
description()
click to toggle source
# File lib/rspec/matchers/built_in/satisfy.rb, line 24 def description "satisfy block" end
failure_message_for_should()
click to toggle source
# File lib/rspec/matchers/built_in/satisfy.rb, line 16 def failure_message_for_should "expected #{@actual} to satisfy block" end
failure_message_for_should_not()
click to toggle source
# File lib/rspec/matchers/built_in/satisfy.rb, line 20 def failure_message_for_should_not "expected #{@actual} not to satisfy block" end
matches?(actual, &block)
click to toggle source
# File lib/rspec/matchers/built_in/satisfy.rb, line 9 def matches?(actual, &block) @block = block if block @actual = actual @block.call(actual) end
Also aliased as: ==