Class: SubPub::Matchers::SubscribeToTopic
- Inherits:
-
Object
- Object
- SubPub::Matchers::SubscribeToTopic
- Defined in:
- lib/sub_pub_matchers.rb
Instance Method Summary collapse
-
#initialize(expected_topic) ⇒ SubscribeToTopic
constructor
A new instance of SubscribeToTopic.
- #matches?(subject) ⇒ Boolean
Constructor Details
#initialize(expected_topic) ⇒ SubscribeToTopic
Returns a new instance of SubscribeToTopic.
16 17 18 |
# File 'lib/sub_pub_matchers.rb', line 16 def initialize(expected_topic) @expected_topic = expected_topic end |
Instance Method Details
#matches?(subject) ⇒ Boolean
20 21 22 |
# File 'lib/sub_pub_matchers.rb', line 20 def matches?(subject) subject.topic_name.should == @expected_topic end |