Sha256: ec8716f8a950878945afff5a297247217d63ab00298d6240060af98325bd5f8d
Contents?: true
Size: 518 Bytes
Versions: 1
Compression:
Stored size: 518 Bytes
Contents
require 'spec_helper' class MyPublisher include Wisper::Publisher def do_something # ... broadcast(:bar, self) broadcast(:foo, self) end end describe 'simple publishing' do it 'subscribes listener to events' do listener = double('listener') expect(listener).to receive(:foo).with instance_of MyPublisher expect(listener).to receive(:bar).with instance_of MyPublisher my_publisher = MyPublisher.new my_publisher.add_listener(listener) my_publisher.do_something end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
wisper-1.4.0 | spec/lib/simple_example_spec.rb |