Module: BeanCounter::SpecMatchers
- Defined in:
- lib/bean_counter/spec_matchers.rb
Instance Method Summary collapse
-
#have_enqueued(expected) ⇒ BeanCounter::EnqueuedExpectation
Creates a new EnqueuedExpectation with
expected
stored for later use when matching. -
#have_tube(expected) ⇒ BeanCounter::TubeExpectation
Creates a new TubeExpectation with
expected
stored for later use when matching.
Instance Method Details
#have_enqueued(expected) ⇒ BeanCounter::EnqueuedExpectation
Creates a new EnqueuedExpectation with expected
stored for
later use when matching. Most of the time the value provided for expected
will be ignored, the only exception is when expected
is given a block.
When a block is provided for expected
, only jobs enqueued during the
execution of the block will be considered when matching.
See EnqueuedExpectation for additional information and usage patterns.
18 19 20 |
# File 'lib/bean_counter/spec_matchers.rb', line 18 def have_enqueued(expected) BeanCounter::EnqueuedExpectation.new(expected) end |
#have_tube(expected) ⇒ BeanCounter::TubeExpectation
Creates a new TubeExpectation with expected
stored for
later use when matching. However, expected
is never used when matching.
Instead, all tubes are matched against until a match is found.
See TubeExpectation for additional information and usage patterns.
34 35 36 |
# File 'lib/bean_counter/spec_matchers.rb', line 34 def have_tube(expected) BeanCounter::TubeExpectation.new(expected) end |