spec/models/subscriber_spec.rb in reactor-0.1.0 vs spec/models/subscriber_spec.rb in reactor-0.1.1
- old
+ new
@@ -20,39 +20,9 @@
subject.was_called.should be_true
end
end
describe '.subscribes_to class helper' do
- #describe 'ensuring subscriber exists and is tied to event' do
- # it 'binds 1-1 when name given' do
- # expect {
- # MySubscriber.class_eval do
- # subscribes_to :event_times
- # end
- # }.to change { Reactor::Subscriber.count }.by(1)
- # end
- #
- # context 'binds to all when star is given' do
- # after { MySubscriber.destroy_all }
- #
- # it 'creates new subscriber' do
- # expect {
- # MySubscriber.class_eval do
- # subscribes_to '*'
- # end
- # }.to change { Reactor::Subscriber.count }.by(1)
- # end
- #
- # it 'doesnt create' do
- # MySubscriber.where(event: '*').first_or_create!
- # expect {
- # MySubscriber.class_eval do
- # subscribes_to '*'
- # end
- # }.to change { Reactor::Subscriber.count }.by(0)
- # end
- # end
- #end
end
describe 'matcher' do
it 'can be set to star to bind to all events' do
MySubscriber.create!(event: '*')