examples/rr/double_dispatching_example.rb in rr-0.1.0 vs examples/rr/double_dispatching_example.rb in rr-0.1.1
- old
+ new
@@ -63,11 +63,11 @@
scenario_2 = @space.create_scenario(@double)
scenario_2.with(3)
proc {@object.foobar(:no_matching_args)}.should raise_error(
- ScenarioNotFoundError,
+ Errors::ScenarioNotFoundError,
"No scenario for arguments [:no_matching_args]"
)
end
end
@@ -101,22 +101,22 @@
@object.foobar(:exact_match)
@object.foobar(:exact_match).should == :return_2
end
- it "raises TimesCalledExpectationError when all of the scenarios Times Called expectation is satisfied" do
+ it "raises TimesCalledError when all of the scenarios Times Called expectation is satisfied" do
scenario1_with_exact_match = @space.create_scenario(@double)
scenario1_with_exact_match.with(:exact_match).returns {:return_1}.once
scenario2_with_exact_match = @space.create_scenario(@double)
scenario2_with_exact_match.with(:exact_match).returns {:return_2}.once
@object.foobar(:exact_match)
@object.foobar(:exact_match)
proc do
@object.foobar(:exact_match)
- end.should raise_error(Expectations::TimesCalledExpectationError)
+ end.should raise_error(Errors::TimesCalledError)
end
end
describe Double, " method dispatching where there are scenarios with duplicate Wildcard Match ArgumentExpectations" do
it_should_behave_like "RR::Double method dispatching"
@@ -148,20 +148,20 @@
@object.foobar(:anything)
@object.foobar(:anything).should == :return_2
end
- it "raises TimesCalledExpectationError when all of the scenarios Times Called expectation is satisfied" do
+ it "raises TimesCalledError when all of the scenarios Times Called expectation is satisfied" do
scenario_1 = @space.create_scenario(@double)
scenario_1.with_any_args.returns {:return_1}.once
scenario_2 = @space.create_scenario(@double)
scenario_2.with_any_args.returns {:return_2}.once
@object.foobar(:anything)
@object.foobar(:anything)
proc do
@object.foobar(:anything)
- end.should raise_error(Expectations::TimesCalledExpectationError)
+ end.should raise_error(Errors::TimesCalledError)
end
end
end