examples/rr/space_create_example.rb in rr-0.1.0 vs examples/rr/space_create_example.rb in rr-0.1.1
- old
+ new
@@ -12,19 +12,19 @@
it "creates a MockCreator" do
creator = @space.create_mock_creator(@object)
creator.foobar(1) {:baz}
@object.foobar(1).should == :baz
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
it "uses block definition when passed a block" do
creator = @space.create_mock_creator(@object) do |c|
c.foobar(1) {:baz}
end
@object.foobar(1).should == :baz
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
end
describe Space, "#create_stub_creator" do
it_should_behave_like "RR::Space"
@@ -68,19 +68,19 @@
it "creates a ProbeCreator" do
creator = @space.create_probe_creator(@object)
creator.foobar(1)
@object.foobar(1).should == :original_foobar
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
it "uses block definition when passed a block" do
creator = @space.create_probe_creator(@object) do |c|
c.foobar(1)
end
@object.foobar(1).should == :original_foobar
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
end
describe Space, "#create_do_not_allow_creator" do
it_should_behave_like "RR::Space"
@@ -91,17 +91,17 @@
end
it "creates a MockCreator" do
creator = @space.create_do_not_allow_creator(@object)
creator.foobar(1)
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
it "uses block definition when passed a block" do
creator = @space.create_do_not_allow_creator(@object) do |c|
c.foobar(1)
end
- proc {@object.foobar(1)}.should raise_error(Expectations::TimesCalledExpectationError)
+ proc {@object.foobar(1)}.should raise_error(Errors::TimesCalledError)
end
end
describe Space, "#create_scenario" do
it_should_behave_like "RR::Space"