Sha256: f5f1ac987bc947eda4d311ca2dd3833469a4762d4d8576e5f0e6a4a1664a1b12
Contents?: true
Size: 701 Bytes
Versions: 11
Compression:
Stored size: 701 Bytes
Contents
require 'spec_helper' describe "Double" do let(:test_double) { double } specify "when one example has an expectation inside the block passed to should_receive" do test_double.should_receive(:msg) do |arg| expect(arg).to be_true #this call exposes the problem end begin test_double.msg(false) rescue Exception end end specify "then the next example should behave as expected instead of saying" do test_double.should_receive(:foobar) test_double.foobar test_double.rspec_verify begin test_double.foobar rescue Exception => e expect(e.message).to eq "Double received unexpected message :foobar with (no args)" end end end
Version data entries
11 entries across 11 versions & 6 rubygems