Module: Spec::Matchers
- Defined in:
- lib/appswarm/cross_spectool.rb
Defined Under Namespace
Instance Method Summary collapse
-
#cross(target, function = nil, raiseException = false) ⇒ Object
:call-seq: should cross().
- #observe(object, method, &block) ⇒ Object
Instance Method Details
#cross(target, function = nil, raiseException = false) ⇒ Object
:call-seq:
should cross()
72 73 74 75 76 77 78 79 |
# File 'lib/appswarm/cross_spectool.rb', line 72 def cross(target,function=nil,raiseException=false) if function.nil? and target.is_a?(Symbol) function=target target=kernel end Cross.new(target,function,raiseException) end |
#observe(object, method, &block) ⇒ Object
126 127 128 129 130 131 |
# File 'lib/appswarm/cross_spectool.rb', line 126 def observe(object,method,&block) observer=Observer.new(object,method) observer.run {block.call(observer)} observer end |