Class: Proletariat::Testing::Expectation
- Inherits:
-
Struct
- Object
- Struct
- Proletariat::Testing::Expectation
- Defined in:
- lib/proletariat/testing/expectation.rb
Overview
Internal: Defines a quantity of messages you expect to receive on a set
of topics.
Instance Attribute Summary collapse
-
#quantity ⇒ Object
Returns the value of attribute quantity.
-
#topics ⇒ Object
Returns the value of attribute topics.
Instance Method Summary collapse
-
#on_topic(*topics) ⇒ Object
Public: Builds a new duplicate of current instance with different topics.
Instance Attribute Details
#quantity ⇒ Object
Returns the value of attribute quantity
5 6 7 |
# File 'lib/proletariat/testing/expectation.rb', line 5 def quantity @quantity end |
#topics ⇒ Object
Returns the value of attribute topics
5 6 7 |
# File 'lib/proletariat/testing/expectation.rb', line 5 def topics @topics end |
Instance Method Details
#on_topic(*topics) ⇒ Object
Public: Builds a new duplicate of current instance with different
topics.
Returns a new instance of Expectation.
10 11 12 |
# File 'lib/proletariat/testing/expectation.rb', line 10 def on_topic(*topics) Expectation.new(topics, quantity) end |