Module: Quickdraw::Matchers::Predicate

Defined in:
lib/quickdraw/matchers/predicate.rb

Instance Method Summary collapse

Instance Method Details

#not_to_be(predicate) ⇒ Object Also known as: not_to_have



8
9
10
# File 'lib/quickdraw/matchers/predicate.rb', line 8

def not_to_be(predicate)
	refute(value.send(predicate)) { "expected `#{value.inspect}` to not be `#{predicate.inspect}`" }
end

#to_be(predicate) ⇒ Object Also known as: to_have



4
5
6
# File 'lib/quickdraw/matchers/predicate.rb', line 4

def to_be(predicate)
	assert(value.send(predicate)) { "expected `#{value.inspect}` to be `#{predicate.inspect}`" }
end