diff --git a/.rvmrc b/.rvmrc index 1ee93ad0..86b95bfa 100644 --- a/.rvmrc +++ b/.rvmrc @@ -1,2 +1,2 @@ -rvm 1.9.2-p180@rr +rvm 1.9.2@rr #rvm ree@rr diff --git a/lib/rr/adapters/rr_methods.rb b/lib/rr/adapters/rr_methods.rb index 0d9bc6e1..c0c68bc4 100644 --- a/lib/rr/adapters/rr_methods.rb +++ b/lib/rr/adapters/rr_methods.rb @@ -36,12 +36,12 @@ def instance_of(subject=DoubleDefinitions::DoubleDefinitionCreate::NO_SUBJECT, m # Verifies all the DoubleInjection objects have met their # TimesCalledExpectations. - def verify + def verify_rr RR::Space.instance.verify_doubles end # Resets the registered Doubles and ordered Doubles - def reset + def reset_rr RR::Space.instance.reset end diff --git a/spec/rr/adapters/rr_methods_space_spec.rb b/spec/rr/adapters/rr_methods_space_spec.rb index fa9c3d97..97ec1a57 100644 --- a/spec/rr/adapters/rr_methods_space_spec.rb +++ b/spec/rr/adapters/rr_methods_space_spec.rb @@ -12,13 +12,13 @@ module Adapters @method_name = :foobar end - describe "#verify" do - it "aliases #rr_verify" do - RRMethods.instance_method("verify").should == RRMethods.instance_method("rr_verify") + describe "#verify_rr" do + it "aliases #rr_verify_rr" do + RRMethods.instance_method("verify_rr").should == RRMethods.instance_method("rr_verify_rr") end end - describe "#rr_verify" do + describe "#rr_verify_rr" do it "verifies and deletes the double_injections" do double_1 = ::RR::Injections::DoubleInjection.find_or_create_by_subject(subject_1, method_name) double_1_verify_calls = 0 @@ -46,7 +46,7 @@ class << double_1; end end - rr_verify + rr_verify_rr double_1_verify_calls.should == 1 double_2_verify_calls.should == 1 double_1_reset_calls.should == 1 @@ -54,20 +54,20 @@ class << double_1; end end - describe "#reset" do - it "aliases #rr_reset" do - RRMethods.instance_method("reset").should == RRMethods.instance_method("rr_reset") + describe "#reset_rr" do + it "aliases #rr_reset_rr" do + RRMethods.instance_method("reset_rr").should == RRMethods.instance_method("rr_reset_rr") end end - describe "#rr_reset" do + describe "#rr_reset_rr" do it "removes the ordered doubles" do mock(subject_1).foobar1.ordered mock(subject_2).foobar2.ordered ::RR::Injections::DoubleInjection.instances.should_not be_empty - rr_reset + rr_reset_rr ::RR::Injections::DoubleInjection.instances ::RR::Injections::DoubleInjection.instances.should be_empty end @@ -88,7 +88,7 @@ class << double_1; end end - rr_reset + rr_reset_rr double_1_reset_calls.should == 1 double_2_reset_calls.should == 1 end