Class: SubPub::Matchers::SubscribeToModelCallback

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

Instance Method Summary collapse

Constructor Details

#initialize(*expected) ⇒ SubscribeToModelCallback

Returns a new instance of SubscribeToModelCallback.



36
37
38
# File 'lib/sub_pub_matchers.rb', line 36

def initialize(*expected)
  @callback_name, *@table_attributes = *expected
end

Instance Method Details

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
43
# File 'lib/sub_pub_matchers.rb', line 40

def matches?(subject)
  subject.callback_name.should == @callback_name
  subject.table_attributes.should == @table_attributes
end