class MotionSpec::Matcher::Satisfy

Public Class Methods

new(&condition_block) click to toggle source
# File lib/motion-spec/matcher/satisfy.rb, line 4
def initialize(&condition_block)
  @condition_block = condition_block
end

Public Instance Methods

fail!(_subject, negated) click to toggle source
# File lib/motion-spec/matcher/satisfy.rb, line 12
def fail!(_subject, negated)
  fail FailedExpectation.new(
    FailMessageRenderer.message_for_satisfy(negated)
  )
end
matches?(*values) click to toggle source
# File lib/motion-spec/matcher/satisfy.rb, line 8
def matches?(*values)
  @condition_block.call(*values)
end