rr 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +3 -0
- data/Rakefile +1 -1
- data/examples/rr/expectations/times_called_expectation/times_called_expectation_at_least_example.rb +3 -12
- data/examples/rr/scenario_example.rb +1 -5
- data/examples/rr/times_called_matchers/at_least_matcher_example.rb +3 -10
- data/lib/rr/times_called_matchers/at_least_matcher.rb +1 -1
- metadata +1 -1
data/CHANGES
CHANGED
data/Rakefile
CHANGED
data/examples/rr/expectations/times_called_expectation/times_called_expectation_at_least_example.rb
CHANGED
@@ -39,19 +39,10 @@ module Expectations
|
|
39
39
|
describe TimesCalledExpectation, "#attempt? with AtLeastMatcher" do
|
40
40
|
it_should_behave_like "RR::Expectations::TimesCalledExpectation with AtLeastMatcher"
|
41
41
|
|
42
|
-
it "returns true
|
43
|
-
|
42
|
+
it "always returns true" do
|
43
|
+
@expectation.should be_attempt
|
44
|
+
10.times {@expectation.attempt!}
|
44
45
|
@expectation.should be_attempt
|
45
|
-
end
|
46
|
-
|
47
|
-
it "returns false when attempted expected times" do
|
48
|
-
3.times {@expectation.attempt!}
|
49
|
-
@expectation.should_not be_attempt
|
50
|
-
end
|
51
|
-
|
52
|
-
it "returns false when attempted more than expected times" do
|
53
|
-
4.times {@expectation.attempt!}
|
54
|
-
@expectation.should_not be_attempt
|
55
46
|
end
|
56
47
|
end
|
57
48
|
|
@@ -125,11 +125,7 @@ describe Scenario, "#at_least" do
|
|
125
125
|
|
126
126
|
it "sets up a Times Called Expectation with 1" do
|
127
127
|
@scenario.at_least(2)
|
128
|
-
@scenario.should
|
129
|
-
@scenario.call
|
130
|
-
@scenario.should be_attempt
|
131
|
-
@scenario.call
|
132
|
-
@scenario.should_not be_attempt
|
128
|
+
@scenario.times_matcher.should == TimesCalledMatchers::AtLeastMatcher.new(2)
|
133
129
|
end
|
134
130
|
|
135
131
|
it "sets return value when block passed in" do
|
@@ -45,16 +45,9 @@ module TimesCalledMatchers
|
|
45
45
|
@matcher = AtLeastMatcher.new(@times)
|
46
46
|
end
|
47
47
|
|
48
|
-
it "returns true
|
49
|
-
@matcher.should be_attempt(
|
50
|
-
|
51
|
-
|
52
|
-
it "returns false when == expected times" do
|
53
|
-
@matcher.should_not be_attempt(3)
|
54
|
-
end
|
55
|
-
|
56
|
-
it "returns false when > expected times" do
|
57
|
-
@matcher.should_not be_attempt(4)
|
48
|
+
it "always returns true" do
|
49
|
+
@matcher.should be_attempt(1)
|
50
|
+
@matcher.should be_attempt(100000)
|
58
51
|
end
|
59
52
|
end
|
60
53
|
|
metadata
CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.3
|
|
3
3
|
specification_version: 1
|
4
4
|
name: rr
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
6
|
+
version: 0.1.11
|
7
7
|
date: 2007-07-14 00:00:00 -07:00
|
8
8
|
summary: RR (Double Ruby) is a double framework that features a rich selection of double techniques and a terse syntax. http://xunitpatterns.com/Test%20Double.html
|
9
9
|
require_paths:
|