Module: Be::Kernel
- Included in:
- Object
- Defined in:
- lib/be/kernel.rb
Instance Method Summary collapse
Instance Method Details
#be(measure = :'n/a') ⇒ Object
be
"object".should be("object")
"object".should be.kind_of?(String)
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/be/kernel.rb', line 19 def be(measure=:'n/a') criteria = { :compare => :==, :default => :==, :caller => caller } if measure != :'n/a' criteria[:measure] = measure end Be::Delegator.new(criteria) end |
#have(measure = :'n/a') ⇒ Object
have
"object".should have('bj')[1..2]
"object".should have.size == 6
"object".should have.size
"object".should have.member?('j')
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/be/kernel.rb', line 39 def have(measure=:'n/a') criteria = { :compare => :==, :default => :include?, :caller => caller } if measure != :'n/a' criteria[:measure] = measure end Be::Delegator.new(criteria) end |