examples/rr/space_verify_example.rb in rr-0.1.2 vs examples/rr/space_verify_example.rb in rr-0.1.3
- old
+ new
@@ -54,11 +54,11 @@
end
it "verifies and deletes the double" do
double = @space.create_double(@object, @method_name)
@space.doubles[@object][@method_name].should === double
- @object.methods.should include("__rr__#{@method_name}__rr__")
+ @object.methods.should include("__rr__#{@method_name}")
verify_calls = 0
(class << double; self; end).class_eval do
define_method(:verify) do ||
verify_calls += 1
@@ -66,17 +66,17 @@
end
@space.verify_double(@object, @method_name)
verify_calls.should == 1
@space.doubles[@object][@method_name].should be_nil
- @object.methods.should_not include("__rr__#{@method_name}__rr__")
+ @object.methods.should_not include("__rr__#{@method_name}")
end
it "deletes the double when verifying the double raises an error" do
double = @space.create_double(@object, @method_name)
@space.doubles[@object][@method_name].should === double
- @object.methods.should include("__rr__#{@method_name}__rr__")
+ @object.methods.should include("__rr__#{@method_name}")
verify_called = true
(class << double; self; end).class_eval do
define_method(:verify) do ||
verify_called = true
@@ -85,10 +85,10 @@
end
proc {@space.verify_double(@object, @method_name)}.should raise_error
verify_called.should be_true
@space.doubles[@object][@method_name].should be_nil
- @object.methods.should_not include("__rr__#{@method_name}__rr__")
+ @object.methods.should_not include("__rr__#{@method_name}")
end
end
describe Space, "#verify_ordered_scenario", :shared => true do
it_should_behave_like "RR::Space"
\ No newline at end of file