spec/lib/wisper_spec.rb in wisper-1.4.0 vs spec/lib/wisper_spec.rb in wisper-1.5.0

- old
+ new

@@ -1,7 +1,5 @@ -require 'spec_helper' - describe Wisper do before do # assign the stderr to a new StringIO to test errors @orig_stderr, $stderr = $stderr, StringIO.new end @@ -76,7 +74,21 @@ expect(Wisper::GlobalListeners.listeners).to include listener_1, listener_2 expect(Wisper::GlobalListeners.listeners).not_to include listener_3 end end + end + + it '.configuration returns configuration' do + expect(Wisper.configuration).to be_an_instance_of(Wisper::Configuration) + end + + it '.configure yields block to configuration' do + Wisper.configure do |config| + expect(config).to be_an_instance_of(Wisper::Configuration) + end + end + + it 'has a default broadcaster' do + expect(Wisper.configuration.broadcasters[:default]).to be_instance_of(Wisper::Broadcasters::SendBroadcaster) end end