rushcheck 0.6 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (162) hide show
  1. data/README +0 -18
  2. data/Rakefile +18 -2
  3. data/Rakefile.in +17 -1
  4. data/data/rushcheck/doc/rushcheck.thtml +4 -3
  5. data/data/rushcheck/examples/roguetile.rb +2 -2
  6. data/data/rushcheck/examples/rspec/stack_spec.rb +22 -22
  7. data/data/rushcheck/rdoc/classes/FalseClass.html +15 -15
  8. data/data/rushcheck/rdoc/classes/FalseClass.src/M000008.html +4 -4
  9. data/data/rushcheck/rdoc/classes/FalseClass.src/M000009.html +18 -0
  10. data/data/rushcheck/rdoc/classes/FalseClass.src/M000010.html +18 -0
  11. data/data/rushcheck/rdoc/classes/Float.html +20 -20
  12. data/data/rushcheck/rdoc/classes/Float.src/M000021.html +21 -0
  13. data/data/rushcheck/rdoc/classes/Float.src/M000022.html +18 -0
  14. data/data/rushcheck/rdoc/classes/Float.src/M000023.html +22 -0
  15. data/data/rushcheck/rdoc/classes/Float.src/M000024.html +20 -0
  16. data/data/rushcheck/rdoc/classes/NegativeInteger.html +160 -0
  17. data/data/rushcheck/rdoc/classes/NegativeInteger.src/M000005.html +26 -0
  18. data/data/rushcheck/rdoc/classes/NegativeInteger.src/M000006.html +21 -0
  19. data/data/rushcheck/rdoc/classes/NilClass.html +15 -15
  20. data/data/rushcheck/rdoc/classes/NilClass.src/M000029.html +18 -0
  21. data/data/rushcheck/rdoc/classes/NilClass.src/M000030.html +18 -0
  22. data/data/rushcheck/rdoc/classes/NilClass.src/M000031.html +18 -0
  23. data/data/rushcheck/rdoc/classes/NonEmptyRandomArray.html +139 -0
  24. data/data/rushcheck/rdoc/classes/NonEmptyRandomArray.src/M000011.html +20 -0
  25. data/data/rushcheck/rdoc/classes/PositiveInteger.html +160 -0
  26. data/data/rushcheck/rdoc/classes/PositiveInteger.src/M000032.html +26 -0
  27. data/data/rushcheck/rdoc/classes/PositiveInteger.src/M000033.html +21 -0
  28. data/data/rushcheck/rdoc/classes/RandomArray.html +75 -15
  29. data/data/rushcheck/rdoc/classes/RandomArray.src/M000012.html +19 -0
  30. data/data/rushcheck/rdoc/classes/RandomArray.src/M000013.html +25 -0
  31. data/data/rushcheck/rdoc/classes/RandomArray.src/M000014.html +27 -0
  32. data/data/rushcheck/rdoc/classes/RandomArray.src/M000015.html +23 -0
  33. data/data/rushcheck/rdoc/classes/RandomArray.src/M000016.html +23 -0
  34. data/data/rushcheck/rdoc/classes/RandomArray.src/M000017.html +22 -0
  35. data/data/rushcheck/rdoc/classes/RandomHash.html +16 -16
  36. data/data/rushcheck/rdoc/classes/RandomHash.src/M000018.html +19 -0
  37. data/data/rushcheck/rdoc/classes/RandomHash.src/M000019.html +26 -0
  38. data/data/rushcheck/rdoc/classes/RandomHash.src/M000020.html +22 -0
  39. data/data/rushcheck/rdoc/classes/RandomProc.html +20 -20
  40. data/data/rushcheck/rdoc/classes/RandomProc.src/M000025.html +18 -0
  41. data/data/rushcheck/rdoc/classes/RandomProc.src/M000026.html +30 -0
  42. data/data/rushcheck/rdoc/classes/RandomProc.src/M000027.html +26 -0
  43. data/data/rushcheck/rdoc/classes/RandomProc.src/M000028.html +20 -0
  44. data/data/rushcheck/rdoc/classes/RushCheck.html +10 -10
  45. data/data/rushcheck/rdoc/classes/RushCheck.src/M000041.html +18 -0
  46. data/data/rushcheck/rdoc/classes/RushCheck.src/M000042.html +27 -0
  47. data/data/rushcheck/rdoc/classes/RushCheck/Arbitrary.html +5 -5
  48. data/data/rushcheck/rdoc/classes/RushCheck/Arbitrary.src/M000043.html +18 -0
  49. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.html +12 -12
  50. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.src/M000081.html +19 -0
  51. data/data/rushcheck/rdoc/classes/RushCheck/Assertion.src/M000082.html +23 -0
  52. data/data/rushcheck/rdoc/classes/RushCheck/Claim.html +9 -9
  53. data/data/rushcheck/rdoc/classes/RushCheck/Claim.src/M000116.html +21 -0
  54. data/data/rushcheck/rdoc/classes/RushCheck/Coarbitrary.html +5 -5
  55. data/data/rushcheck/rdoc/classes/RushCheck/Coarbitrary.src/M000066.html +18 -0
  56. data/data/rushcheck/rdoc/classes/RushCheck/Config.html +35 -35
  57. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000074.html +23 -0
  58. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000075.html +22 -0
  59. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000076.html +22 -0
  60. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000077.html +18 -0
  61. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000078.html +38 -0
  62. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000079.html +55 -0
  63. data/data/rushcheck/rdoc/classes/RushCheck/Config.src/M000080.html +50 -0
  64. data/data/rushcheck/rdoc/classes/RushCheck/Gen.html +107 -107
  65. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000083.html +4 -4
  66. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000084.html +26 -4
  67. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000085.html +4 -4
  68. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000086.html +6 -10
  69. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000087.html +14 -4
  70. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000088.html +9 -6
  71. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000089.html +4 -4
  72. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000090.html +4 -4
  73. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000091.html +4 -9
  74. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000092.html +4 -5
  75. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000093.html +4 -4
  76. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000094.html +8 -8
  77. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000095.html +18 -0
  78. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000096.html +21 -0
  79. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000097.html +18 -0
  80. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000098.html +18 -0
  81. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000099.html +23 -0
  82. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000100.html +19 -0
  83. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000101.html +18 -0
  84. data/data/rushcheck/rdoc/classes/RushCheck/Gen.src/M000102.html +22 -0
  85. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.html +20 -20
  86. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000049.html +22 -0
  87. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000050.html +32 -0
  88. data/data/rushcheck/rdoc/classes/RushCheck/HsRandom.src/M000051.html +18 -0
  89. data/data/rushcheck/rdoc/classes/RushCheck/Property.html +10 -10
  90. data/data/rushcheck/rdoc/classes/RushCheck/Property.src/M000114.html +26 -0
  91. data/data/rushcheck/rdoc/classes/RushCheck/Property.src/M000115.html +18 -0
  92. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.html +10 -10
  93. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.src/M000047.html +18 -0
  94. data/data/rushcheck/rdoc/classes/RushCheck/RandomBool.src/M000048.html +19 -0
  95. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.html +20 -20
  96. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000044.html +18 -0
  97. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000045.html +18 -0
  98. data/data/rushcheck/rdoc/classes/RushCheck/RandomGen.src/M000046.html +18 -0
  99. data/data/rushcheck/rdoc/classes/RushCheck/Result.html +19 -19
  100. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000103.html +18 -0
  101. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000104.html +18 -0
  102. data/data/rushcheck/rdoc/classes/RushCheck/Result.src/M000105.html +18 -0
  103. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.html +27 -27
  104. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000069.html +23 -0
  105. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000070.html +21 -0
  106. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000071.html +21 -0
  107. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000072.html +18 -0
  108. data/data/rushcheck/rdoc/classes/RushCheck/StdGen.src/M000073.html +18 -0
  109. data/data/rushcheck/rdoc/classes/RushCheck/TestFailed.html +5 -5
  110. data/data/rushcheck/rdoc/classes/RushCheck/TestFailed.src/M000107.html +18 -0
  111. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.html +10 -10
  112. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.src/M000067.html +18 -0
  113. data/data/rushcheck/rdoc/classes/RushCheck/TestOptions.src/M000068.html +18 -0
  114. data/data/rushcheck/rdoc/classes/RushCheck/TestResult.html +5 -5
  115. data/data/rushcheck/rdoc/classes/RushCheck/TestResult.src/M000108.html +18 -0
  116. data/data/rushcheck/rdoc/classes/RushCheck/Testable.html +66 -66
  117. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000052.html +4 -5
  118. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000053.html +4 -7
  119. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000056.html +4 -4
  120. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000057.html +4 -4
  121. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000058.html +18 -0
  122. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000060.html +19 -0
  123. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000061.html +21 -0
  124. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000062.html +18 -0
  125. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000064.html +18 -0
  126. data/data/rushcheck/rdoc/classes/RushCheck/Testable.src/M000065.html +18 -0
  127. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.html +38 -21
  128. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000109.html +18 -0
  129. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000110.html +20 -0
  130. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000111.html +21 -0
  131. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000112.html +18 -0
  132. data/data/rushcheck/rdoc/classes/RushCheck/TheStdGen.src/M000113.html +18 -0
  133. data/data/rushcheck/rdoc/classes/SpecialString.html +5 -5
  134. data/data/rushcheck/rdoc/classes/SpecialString.src/M000007.html +37 -0
  135. data/data/rushcheck/rdoc/classes/String.html +20 -20
  136. data/data/rushcheck/rdoc/classes/String.src/M000034.html +24 -0
  137. data/data/rushcheck/rdoc/classes/String.src/M000035.html +18 -0
  138. data/data/rushcheck/rdoc/classes/String.src/M000036.html +25 -0
  139. data/data/rushcheck/rdoc/classes/String.src/M000037.html +22 -0
  140. data/data/rushcheck/rdoc/classes/TrueClass.html +15 -15
  141. data/data/rushcheck/rdoc/classes/TrueClass.src/M000038.html +18 -0
  142. data/data/rushcheck/rdoc/classes/TrueClass.src/M000039.html +18 -0
  143. data/data/rushcheck/rdoc/classes/TrueClass.src/M000040.html +18 -0
  144. data/data/rushcheck/rdoc/created.rid +1 -1
  145. data/data/rushcheck/rdoc/files/rushcheck/array_rb.html +1 -1
  146. data/data/rushcheck/rdoc/files/rushcheck/assertion_rb.html +1 -1
  147. data/data/rushcheck/rdoc/files/rushcheck/bool_rb.html +1 -1
  148. data/data/rushcheck/rdoc/files/rushcheck/config_rb.html +1 -1
  149. data/data/rushcheck/rdoc/files/rushcheck/gen_rb.html +1 -1
  150. data/data/rushcheck/rdoc/files/rushcheck/integer_rb.html +1 -1
  151. data/data/rushcheck/rdoc/files/rushcheck/random_rb.html +1 -1
  152. data/data/rushcheck/rdoc/files/rushcheck/version_rb.html +1 -1
  153. data/data/rushcheck/rdoc/fr_class_index.html +3 -0
  154. data/data/rushcheck/rdoc/fr_method_index.html +112 -103
  155. data/lib/rushcheck/array.rb +58 -17
  156. data/lib/rushcheck/assertion.rb +1 -1
  157. data/lib/rushcheck/gen.rb +7 -9
  158. data/lib/rushcheck/integer.rb +56 -0
  159. data/lib/rushcheck/property.rb +1 -1
  160. data/lib/rushcheck/random.rb +5 -1
  161. data/lib/rushcheck/version.rb +1 -1
  162. metadata +98 -2
data/README CHANGED
@@ -29,21 +29,3 @@ is distributed under LGPL. Because the RushCheck library does
29
29
  not use any output of setup.rb and not linked to setup.rb,
30
30
  the LGPL is applied to setup.rb only. (Let me know if I am
31
31
  misunderstanding about the license issue)
32
-
33
- = Changes from setup.rb ver 3.4.1
34
-
35
- The installer setup.rb is distributed under LGPL by Minero Aoki.
36
- http://raa.ruby-lang.org/project/setup/
37
- http://i.loveruby.net/en/projects/setup/
38
-
39
- There are two changes from the original setup.rb ver 3.4.1.
40
-
41
- 1. change for the test command of setup.rb
42
-
43
- I have to modify setup.rb to work with darcs. Darcs requires
44
- the test script that it should be change the status to 1 when
45
- any test is failed. However, the original setup.rb (ver 3.4.1)
46
- does not change unless a test is failed.
47
-
48
- 2. add the rdoc command to setup.rb and distclean the rdoc dir
49
-
data/Rakefile CHANGED
@@ -1,15 +1,16 @@
1
1
  # Rakefile for RushCheck
2
- #
2
+ # Do NOT edit Rakefile but edit Rakefile.in!
3
3
  #
4
4
 
5
5
  require 'rubygems'
6
6
  require 'rake'
7
7
  require 'rake/gempackagetask'
8
8
 
9
- RUSHCHECK_VERSION="0.6"
9
+ RUSHCHECK_VERSION="0.7"
10
10
  task :default => ["dist", "gem"]
11
11
 
12
12
  task :dist do
13
+ system "darcs push -a"
13
14
  system "darcs dist -d rushcheck-#{RUSHCHECK_VERSION}"
14
15
  system "mv rushcheck-#{RUSHCHECK_VERSION}.tar.gz pkg/"
15
16
  end
@@ -43,3 +44,18 @@ Rake::GemPackageTask.new(spec) do |pkg|
43
44
  pkg.need_zip = true
44
45
  pkg.need_tar = true
45
46
  end
47
+
48
+ task :rdoc do
49
+ Dir.chdir('./lib') do
50
+ system ['rdoc', '-o', '../data/rushcheck/rdoc'].join(' ')
51
+ end
52
+ end
53
+
54
+ task :test_all => Dir.glob("test/spec_*.rb") do |t|
55
+ Dir.chdir('./test') do
56
+ specs = t.prerequisites.map {|f| File.basename f}
57
+ specs.each do |spec|
58
+ raise RuntimeError, "a test is failed" unless system ['spec', spec, '-f', 's', '-c', '-b'].join(' ')
59
+ end
60
+ end
61
+ end
data/Rakefile.in CHANGED
@@ -1,5 +1,5 @@
1
1
  # Rakefile for RushCheck
2
- #
2
+ # Do NOT edit Rakefile but edit Rakefile.in!
3
3
  #
4
4
 
5
5
  require 'rubygems'
@@ -10,6 +10,7 @@ RUSHCHECK_VERSION="@VERSION@"
10
10
  task :default => ["dist", "gem"]
11
11
 
12
12
  task :dist do
13
+ system "darcs push -a"
13
14
  system "darcs dist -d rushcheck-#{RUSHCHECK_VERSION}"
14
15
  system "mv rushcheck-#{RUSHCHECK_VERSION}.tar.gz pkg/"
15
16
  end
@@ -43,3 +44,18 @@ Rake::GemPackageTask.new(spec) do |pkg|
43
44
  pkg.need_zip = true
44
45
  pkg.need_tar = true
45
46
  end
47
+
48
+ task :rdoc do
49
+ Dir.chdir('./lib') do
50
+ system ['rdoc', '-o', '../data/rushcheck/rdoc'].join(' ')
51
+ end
52
+ end
53
+
54
+ task :test_all => Dir.glob("test/spec_*.rb") do |t|
55
+ Dir.chdir('./test') do
56
+ specs = t.prerequisites.map {|f| File.basename f}
57
+ specs.each do |spec|
58
+ raise RuntimeError, "a test is failed" unless system ['spec', spec, '-f', 's', '-c', '-b'].join(' ')
59
+ end
60
+ end
61
+ end
@@ -1,5 +1,5 @@
1
1
  <address>
2
- last-modified: 2006-10-06 Daisuke IKEGAMI <ikegami@madscientist.jp>
2
+ last-modified: 2006-10-13 Daisuke IKEGAMI <ikegami@madscientist.jp>
3
3
  </address>
4
4
 
5
5
  This tutorial is written in a simple markup language
@@ -19,8 +19,8 @@ h1. Index
19
19
  ## <a href="#Watching the statistics">Watching the statistics</a>
20
20
  ### <a href="#trivial">'trivial'</a>
21
21
  ### <a href="#classify">'classify'</a>
22
- # <a href="Combining unit testing and RushCheck">Combining unit testing and RushCheck</a>
23
- # <a href="Combining RSpec and RushCheck">Combining RSpec and RushCheck</a>
22
+ # <a href="#Combining unit testing and RushCheck">Combining unit testing and RushCheck</a>
23
+ # <a href="#Combining RSpec and RushCheck">Combining RSpec and RushCheck</a>
24
24
  ## <a href="#With another basic classes for assertions">With another basic classes for assertions</a>
25
25
  ### <a href="#SpecialString">SpecialString</a>
26
26
  ### <a href="#Array and RandomArray">Array and RandomArray</a>
@@ -337,6 +337,7 @@ Example:
337
337
  </pre>
338
338
 
339
339
  h2. <a name="Combining RSpec and RushCheck">Combining RSpec and RushCheck</a>
340
+
340
341
  "RSpec":http://rspec.rubyforge.org is another testing framework which helps Behaviour Driven Development (BDD).
341
342
  To combine RSpec and RushCheck, the following trick maybe useful and easy to read:
342
343
  <pre>
@@ -77,7 +77,7 @@ class Tree
77
77
  end
78
78
  end
79
79
 
80
- class Leaf
80
+ class Leaf < Tree
81
81
  extend RushCheck::Arbitrary
82
82
  include RushCheck::Coarbitrary
83
83
 
@@ -90,7 +90,7 @@ class Leaf
90
90
  end
91
91
  end
92
92
 
93
- class Branch
93
+ class Branch < Tree
94
94
  extend RushCheck::Arbitrary
95
95
  include RushCheck::Coarbitrary
96
96
 
@@ -19,7 +19,7 @@ rescue LoadError
19
19
  require 'rushcheck'
20
20
  end
21
21
 
22
- def forall(*cs, &f)
22
+ def for_all(*cs, &f)
23
23
  RushCheck::Claim.new(*cs, &f).check.should_equal true
24
24
  end
25
25
 
@@ -28,7 +28,7 @@ require 'stack'
28
28
  context "An empty stack" do
29
29
 
30
30
  specify "should not be empty after 'push'" do
31
- forall(Integer) do |item|
31
+ for_all(Integer) do |item|
32
32
  stack = Stack.new
33
33
  stack.push item
34
34
  stack.should_not_be_empty
@@ -59,14 +59,14 @@ context "A stack (in general)" do
59
59
  end
60
60
 
61
61
  specify "should add the top when sent 'push'" do
62
- forall(NotEmptyAndFullStack, String) do |stack, item|
62
+ for_all(NotEmptyAndFullStack, String) do |stack, item|
63
63
  stack.push item
64
64
  stack.peek.should_equal item
65
65
  end
66
66
  end
67
67
 
68
68
  specify "should NOT remove the top item when sent 'peek'" do
69
- forall(NotEmptyAndFullStack, Integer) do |stack, item|
69
+ for_all(NotEmptyAndFullStack, Integer) do |stack, item|
70
70
  stack.push item
71
71
  stack.peek.should_equal item
72
72
  stack.peek.should_equal item
@@ -74,14 +74,14 @@ context "A stack (in general)" do
74
74
  end
75
75
 
76
76
  specify "should return the top item when sent 'pop'" do
77
- forall(NotEmptyAndFullStack, Integer) do |stack, item|
77
+ for_all(NotEmptyAndFullStack, Integer) do |stack, item|
78
78
  stack.push item
79
79
  stack.pop.should_equal item
80
80
  end
81
81
  end
82
82
 
83
83
  specify "should remove the top item when sent 'pop'" do
84
- forall(NotEmptyAndFullStack, Integer, Integer) do |stack, dummy, item|
84
+ for_all(NotEmptyAndFullStack, Integer, Integer) do |stack, dummy, item|
85
85
  stack.push item
86
86
  stack.push dummy
87
87
  stack.pop
@@ -98,7 +98,7 @@ context "An empty stack" do
98
98
  end
99
99
 
100
100
  specify "should no longer be empty" do
101
- forall(Integer) do |item|
101
+ for_all(Integer) do |item|
102
102
  stack = Stack.new
103
103
  stack.push item
104
104
  stack.should_not_be_empty
@@ -116,7 +116,7 @@ end
116
116
 
117
117
  context "An almost empty stack (with one item)" do
118
118
  specify "should not be empty" do
119
- forall(Integer) do |item|
119
+ for_all(Integer) do |item|
120
120
  stack = Stack.new
121
121
  stack.push item
122
122
  stack.should_not_be_empty
@@ -124,7 +124,7 @@ context "An almost empty stack (with one item)" do
124
124
  end
125
125
 
126
126
  specify "should remain not empty after 'peek'" do
127
- forall(Integer) do |item|
127
+ for_all(Integer) do |item|
128
128
  stack = Stack.new
129
129
  stack.push item
130
130
  stack.peek
@@ -133,7 +133,7 @@ context "An almost empty stack (with one item)" do
133
133
  end
134
134
 
135
135
  specify "should become empty after 'pop'" do
136
- forall(Integer) do |item|
136
+ for_all(Integer) do |item|
137
137
  stack = Stack.new
138
138
  stack.push item
139
139
  stack.pop
@@ -163,15 +163,15 @@ context "An almost full stack (with one item less than capacity)" do
163
163
  end
164
164
 
165
165
  specify "should not be full" do
166
- forall(AlmostFullStack) do |stack|
167
- stack.should.not.be.full
166
+ for_all(AlmostFullStack) do |stack|
167
+ stack.should_not_be_full
168
168
  end
169
169
  end
170
170
 
171
171
  specify "should become full when sent 'push'" do
172
- forall(AlmostFullStack, Integer) do |stack, item|
172
+ for_all(AlmostFullStack, Integer) do |stack, item|
173
173
  stack.push item
174
- stack.should.be.full
174
+ stack.should_be_full
175
175
  end
176
176
  end
177
177
  end
@@ -196,28 +196,28 @@ context "A full stack" do
196
196
  end
197
197
 
198
198
  specify "should be full" do
199
- forall(FullStack) do |stack|
200
- stack.should.be.full
199
+ for_all(FullStack) do |stack|
200
+ stack.should_be_full
201
201
  end
202
202
  end
203
203
 
204
204
  specify "should remain full after 'peek'" do
205
- forall(FullStack) do |stack|
205
+ for_all(FullStack) do |stack|
206
206
  stack.peek
207
- stack.should.be.full
207
+ stack.should_be_full
208
208
  end
209
209
  end
210
210
 
211
211
  specify "should no longer be full after 'pop'" do
212
- forall(FullStack) do |stack|
212
+ for_all(FullStack) do |stack|
213
213
  stack.pop
214
- stack.should.not.be.full
214
+ stack.should_not_be_full
215
215
  end
216
216
  end
217
217
 
218
218
  specify "should complain on 'push'" do
219
- forall(FullStack, Integer) do |stack, item|
220
- lambda { stack.push item }.should.raise StackOverflowError
219
+ for_all(FullStack, Integer) do |stack, item|
220
+ lambda { stack.push item }.should_raise StackOverflowError
221
221
  end
222
222
  end
223
223
  end
@@ -86,9 +86,9 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000006">bound</a>&nbsp;&nbsp;
90
- <a href="#M000007">coarbitrary</a>&nbsp;&nbsp;
91
- <a href="#M000008">property</a>&nbsp;&nbsp;
89
+ <a href="#M000008">bound</a>&nbsp;&nbsp;
90
+ <a href="#M000009">coarbitrary</a>&nbsp;&nbsp;
91
+ <a href="#M000010">property</a>&nbsp;&nbsp;
92
92
  </div>
93
93
  </div>
94
94
 
@@ -118,12 +118,12 @@
118
118
  <div id="methods">
119
119
  <h3 class="section-bar">Public Class methods</h3>
120
120
 
121
- <div id="method-M000006" class="method-detail">
122
- <a name="M000006"></a>
121
+ <div id="method-M000008" class="method-detail">
122
+ <a name="M000008"></a>
123
123
 
124
124
  <div class="method-heading">
125
- <a href="FalseClass.src/M000006.html" target="Code" class="method-signature"
126
- onclick="popupCode('FalseClass.src/M000006.html');return false;">
125
+ <a href="FalseClass.src/M000008.html" target="Code" class="method-signature"
126
+ onclick="popupCode('FalseClass.src/M000008.html');return false;">
127
127
  <span class="method-name">bound</span><span class="method-args">()</span>
128
128
  </a>
129
129
  </div>
@@ -134,12 +134,12 @@
134
134
 
135
135
  <h3 class="section-bar">Public Instance methods</h3>
136
136
 
137
- <div id="method-M000007" class="method-detail">
138
- <a name="M000007"></a>
137
+ <div id="method-M000009" class="method-detail">
138
+ <a name="M000009"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="FalseClass.src/M000007.html" target="Code" class="method-signature"
142
- onclick="popupCode('FalseClass.src/M000007.html');return false;">
141
+ <a href="FalseClass.src/M000009.html" target="Code" class="method-signature"
142
+ onclick="popupCode('FalseClass.src/M000009.html');return false;">
143
143
  <span class="method-name">coarbitrary</span><span class="method-args">(g)</span>
144
144
  </a>
145
145
  </div>
@@ -148,12 +148,12 @@
148
148
  </div>
149
149
  </div>
150
150
 
151
- <div id="method-M000008" class="method-detail">
152
- <a name="M000008"></a>
151
+ <div id="method-M000010" class="method-detail">
152
+ <a name="M000010"></a>
153
153
 
154
154
  <div class="method-heading">
155
- <a href="FalseClass.src/M000008.html" target="Code" class="method-signature"
156
- onclick="popupCode('FalseClass.src/M000008.html');return false;">
155
+ <a href="FalseClass.src/M000010.html" target="Code" class="method-signature"
156
+ onclick="popupCode('FalseClass.src/M000010.html');return false;">
157
157
  <span class="method-name">property</span><span class="method-args">()</span>
158
158
  </a>
159
159
  </div>
@@ -5,14 +5,14 @@
5
5
 
6
6
  <html>
7
7
  <head>
8
- <title>property (FalseClass)</title>
8
+ <title>bound (FalseClass)</title>
9
9
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
10
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
11
  </head>
12
12
  <body class="standalone-code">
13
- <pre><span class="ruby-comment cmt"># File rushcheck/bool.rb, line 69</span>
14
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">property</span>
15
- <span class="ruby-constant">RushCheck</span><span class="ruby-operator">::</span><span class="ruby-constant">Result</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">result</span>
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/bool.rb, line 61</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">bound</span>
15
+ [<span class="ruby-ivar">@@min_bound</span>, <span class="ruby-ivar">@@max_bound</span>]
16
16
  <span class="ruby-keyword kw">end</span></pre>
17
17
  </body>
18
18
  </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>coarbitrary (FalseClass)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/bool.rb, line 65</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">coarbitrary</span>(<span class="ruby-identifier">g</span>)
15
+ <span class="ruby-identifier">g</span>.<span class="ruby-identifier">variant</span>(<span class="ruby-value">1</span>)
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html>
7
+ <head>
8
+ <title>property (FalseClass)</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
11
+ </head>
12
+ <body class="standalone-code">
13
+ <pre><span class="ruby-comment cmt"># File rushcheck/bool.rb, line 69</span>
14
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">property</span>
15
+ <span class="ruby-constant">RushCheck</span><span class="ruby-operator">::</span><span class="ruby-constant">Result</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>).<span class="ruby-identifier">result</span>
16
+ <span class="ruby-keyword kw">end</span></pre>
17
+ </body>
18
+ </html>
@@ -86,10 +86,10 @@
86
86
  <h3 class="section-bar">Methods</h3>
87
87
 
88
88
  <div class="name-list">
89
- <a href="#M000015">arbitrary</a>&nbsp;&nbsp;
90
- <a href="#M000016">bound</a>&nbsp;&nbsp;
91
- <a href="#M000018">coarbitrary</a>&nbsp;&nbsp;
92
- <a href="#M000017">random_range</a>&nbsp;&nbsp;
89
+ <a href="#M000021">arbitrary</a>&nbsp;&nbsp;
90
+ <a href="#M000022">bound</a>&nbsp;&nbsp;
91
+ <a href="#M000024">coarbitrary</a>&nbsp;&nbsp;
92
+ <a href="#M000023">random_range</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -118,12 +118,12 @@
118
118
  <div id="methods">
119
119
  <h3 class="section-bar">Public Class methods</h3>
120
120
 
121
- <div id="method-M000015" class="method-detail">
122
- <a name="M000015"></a>
121
+ <div id="method-M000021" class="method-detail">
122
+ <a name="M000021"></a>
123
123
 
124
124
  <div class="method-heading">
125
- <a href="Float.src/M000015.html" target="Code" class="method-signature"
126
- onclick="popupCode('Float.src/M000015.html');return false;">
125
+ <a href="Float.src/M000021.html" target="Code" class="method-signature"
126
+ onclick="popupCode('Float.src/M000021.html');return false;">
127
127
  <span class="method-name">arbitrary</span><span class="method-args">()</span>
128
128
  </a>
129
129
  </div>
@@ -132,12 +132,12 @@
132
132
  </div>
133
133
  </div>
134
134
 
135
- <div id="method-M000016" class="method-detail">
136
- <a name="M000016"></a>
135
+ <div id="method-M000022" class="method-detail">
136
+ <a name="M000022"></a>
137
137
 
138
138
  <div class="method-heading">
139
- <a href="Float.src/M000016.html" target="Code" class="method-signature"
140
- onclick="popupCode('Float.src/M000016.html');return false;">
139
+ <a href="Float.src/M000022.html" target="Code" class="method-signature"
140
+ onclick="popupCode('Float.src/M000022.html');return false;">
141
141
  <span class="method-name">bound</span><span class="method-args">()</span>
142
142
  </a>
143
143
  </div>
@@ -146,12 +146,12 @@
146
146
  </div>
147
147
  </div>
148
148
 
149
- <div id="method-M000017" class="method-detail">
150
- <a name="M000017"></a>
149
+ <div id="method-M000023" class="method-detail">
150
+ <a name="M000023"></a>
151
151
 
152
152
  <div class="method-heading">
153
- <a href="Float.src/M000017.html" target="Code" class="method-signature"
154
- onclick="popupCode('Float.src/M000017.html');return false;">
153
+ <a href="Float.src/M000023.html" target="Code" class="method-signature"
154
+ onclick="popupCode('Float.src/M000023.html');return false;">
155
155
  <span class="method-name">random_range</span><span class="method-args">(gen, lo=@@min_bound, hi=@@max_bound)</span>
156
156
  </a>
157
157
  </div>
@@ -162,12 +162,12 @@
162
162
 
163
163
  <h3 class="section-bar">Public Instance methods</h3>
164
164
 
165
- <div id="method-M000018" class="method-detail">
166
- <a name="M000018"></a>
165
+ <div id="method-M000024" class="method-detail">
166
+ <a name="M000024"></a>
167
167
 
168
168
  <div class="method-heading">
169
- <a href="Float.src/M000018.html" target="Code" class="method-signature"
170
- onclick="popupCode('Float.src/M000018.html');return false;">
169
+ <a href="Float.src/M000024.html" target="Code" class="method-signature"
170
+ onclick="popupCode('Float.src/M000024.html');return false;">
171
171
  <span class="method-name">coarbitrary</span><span class="method-args">(g)</span>
172
172
  </a>
173
173
  </div>