Sha256: e7ec0ba414c4224d3635bd1fc667461dfa3451e9b89344f941ae4bbf484412e7
Contents?: true
Size: 625 Bytes
Versions: 6
Compression:
Stored size: 625 Bytes
Contents
describe "Mock" do before do @mock = mock("test mock") end specify "when one example has an expectation (non-mock) inside the block passed to the mock" do @mock.should_receive(:msg) do |b| b.should be_true #this call exposes the problem end @mock.msg(false) rescue nil end specify "then the next example should behave as expected instead of saying" do @mock.should_receive(:foobar) @mock.foobar @mock.rspec_verify begin @mock.foobar rescue => e e.message.should == "Mock 'test mock' received unexpected message :foobar with (no args)" end end end
Version data entries
6 entries across 6 versions & 2 rubygems