Class: SubPub::Matchers::SubscribeToTopic

Inherits:
Object
  • Object
show all
Defined in:
lib/sub_pub_matchers.rb

Instance Method Summary collapse

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

Returns:

  • (Boolean)


20
21
22
# File 'lib/sub_pub_matchers.rb', line 20

def matches?(subject)
  subject.topic_name.should == @expected_topic
end