Module: Crspec::Expectations
Constant Summary collapse
- UNDEFINED =
Object.new.freeze
Instance Method Summary collapse
Methods included from Matchers
#be, #be_falsy, #be_nil, #be_truthy, #change, #eq, #include, #raise_error, #respond_to
Instance Method Details
#expect(value = UNDEFINED, &block) ⇒ Object
39 40 41 42 |
# File 'lib/crspec/expectations.rb', line 39 def expect(value = UNDEFINED, &block) actual = value.equal?(UNDEFINED) ? block : value ExpectationTarget.new(actual) end |