rr 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,6 @@
1
+ * 0.1.11
2
+ - Fixed [#12287] AtLeastMatcher does not cause Scenario to be called
3
+
1
4
  * 0.1.10
2
5
  - Fixed [#12286] AnyArgumentExpectation#expected_arguments not implemented
3
6
 
data/Rakefile CHANGED
@@ -21,7 +21,7 @@ def run_suite
21
21
  end
22
22
 
23
23
  PKG_NAME = "rr"
24
- PKG_VERSION = "0.1.10"
24
+ PKG_VERSION = "0.1.11"
25
25
  PKG_FILES = FileList[
26
26
  '[A-Z]*',
27
27
  '*.rb',
@@ -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 when attempted less than expected times" do
43
- 2.times {@expectation.attempt!}
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 be_attempt
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 when less than expected times" do
49
- @matcher.should be_attempt(2)
50
- end
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
 
@@ -10,7 +10,7 @@ module TimesCalledMatchers
10
10
  end
11
11
 
12
12
  def attempt?(times_called)
13
- times_called < @times
13
+ true
14
14
  end
15
15
 
16
16
  protected
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.10
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: