spec/lib/wisper_spec.rb in wisper-1.1.0 vs spec/lib/wisper_spec.rb in wisper-1.2.0
- old
+ new
@@ -20,14 +20,12 @@
publisher.send(:broadcast, 'im_here')
end
publisher.send(:broadcast, 'not_here')
end
-end
-# prevents deprecation warning showing up in spec output
-def silence_warnings
- original_verbosity = $VERBOSE
- $VERBOSE = nil
- yield
- $VERBOSE = original_verbosity
+ it '.add_listener adds a global listener' do
+ listener = double('listener')
+ Wisper.add_listener(listener)
+ Wisper::GlobalListeners.listeners.should == [listener]
+ end
end