examples/rr/extensions/double_methods_example.rb in rr-0.1.6 vs examples/rr/extensions/double_methods_example.rb in rr-0.1.7
- old
+ new
@@ -1,7 +1,6 @@
-dir = File.dirname(__FILE__)
-require "#{dir}/../../example_helper"
+require "examples/example_helper"
module RR
module Extensions
describe DoubleMethods, "#mock" do
before do
@@ -23,11 +22,11 @@
:original_value
end
end
scenario = creator.foobar(1, 2) {:baz}
- scenario.times_called_expectation.times.should == 1
+ scenario.times_called_expectation.matcher.should == TimesCalledMatchers::IntegerMatcher.new(1)
scenario.argument_expectation.class.should == RR::Expectations::ArgumentEqualityError
scenario.argument_expectation.expected_arguments.should == [1, 2]
@subject.foobar(1, 2).should == :baz
end
@@ -119,10 +118,10 @@
:original_value
end
end
scenario = creator.foobar(1, 2)
- scenario.times_called_expectation.times.should == 0
+ scenario.times_called_expectation.matcher.should == TimesCalledMatchers::IntegerMatcher.new(0)
scenario.argument_expectation.class.should == RR::Expectations::ArgumentEqualityError
scenario.argument_expectation.expected_arguments.should == [1, 2]
end
end
end