Sha256: 6111bc7dd1974e974fb52102b05e3f87140e3081151d3975a2bdbc60a29e0637
Contents?: true
Size: 596 Bytes
Versions: 8
Compression:
Stored size: 596 Bytes
Contents
require 'spec_helper' describe Observer::Chain, '#call' do subject { object.call(response) } let(:object) { Observer::Chain.new(observers) } let(:response) { mock('Response') } let(:observer_a) { mock('Observer A') } let(:observer_b) { mock('Observer B') } let(:observers) { [observer_a, observer_b] } it_should_behave_like 'a command method' before do observer_a.stub(:call) observer_b.stub(:call) end it 'should call observers' do observer_a.should_receive(:call).with(response) observer_b.should_receive(:call).with(response) subject end end
Version data entries
8 entries across 8 versions & 1 rubygems