rr 1.0.5 → 1.1.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/CHANGES.md +24 -0
- data/LICENSE +2 -2
- data/README.md +124 -741
- data/VERSION +1 -1
- data/lib/rr.rb +2 -103
- data/lib/rr/adapters/minitest.rb +21 -13
- data/lib/rr/adapters/minitest_active_support.rb +34 -0
- data/lib/rr/adapters/none.rb +17 -0
- data/lib/rr/adapters/{rspec.rb → rspec/invocation_matcher.rb} +2 -27
- data/lib/rr/adapters/rspec_1.rb +42 -0
- data/lib/rr/adapters/rspec_2.rb +24 -0
- data/lib/rr/adapters/test_unit_1.rb +54 -0
- data/lib/rr/adapters/test_unit_2.rb +13 -0
- data/lib/rr/adapters/test_unit_2_active_support.rb +35 -0
- data/lib/rr/autohook.rb +43 -0
- data/lib/rr/core_ext/array.rb +12 -0
- data/lib/rr/core_ext/enumerable.rb +16 -0
- data/lib/rr/core_ext/hash.rb +20 -0
- data/lib/rr/core_ext/range.rb +8 -0
- data/lib/rr/core_ext/regexp.rb +8 -0
- data/lib/rr/double.rb +4 -4
- data/lib/rr/double_definitions/double_definition.rb +9 -3
- data/lib/rr/errors.rb +21 -0
- data/lib/rr/expectations/argument_equality_expectation.rb +10 -7
- data/lib/rr/expectations/times_called_expectation.rb +2 -8
- data/lib/rr/injections/double_injection.rb +1 -1
- data/lib/rr/method_dispatches/base_method_dispatch.rb +1 -1
- data/lib/rr/recorded_calls.rb +12 -12
- data/lib/rr/space.rb +5 -3
- data/lib/rr/times_called_matchers/never_matcher.rb +2 -2
- data/lib/rr/wildcard_matchers/anything.rb +2 -2
- data/lib/rr/wildcard_matchers/boolean.rb +3 -7
- data/lib/rr/wildcard_matchers/duck_type.rb +11 -15
- data/lib/rr/wildcard_matchers/hash_including.rb +14 -13
- data/lib/rr/wildcard_matchers/is_a.rb +6 -7
- data/lib/rr/wildcard_matchers/satisfy.rb +8 -8
- data/lib/rr/without_autohook.rb +112 -0
- data/rr.gemspec +28 -0
- data/spec/global_helper.rb +12 -0
- data/spec/suite.rb +93 -0
- data/spec/suites/common/adapter_tests.rb +37 -0
- data/spec/suites/common/rails_integration_test.rb +175 -0
- data/spec/suites/common/test_unit_tests.rb +25 -0
- data/spec/suites/minitest/integration/minitest_test.rb +13 -0
- data/spec/suites/minitest/test_helper.rb +3 -0
- data/spec/suites/rspec_1/integration/rspec_1_spec.rb +20 -0
- data/spec/suites/rspec_1/integration/test_unit_1_rails_spec.rb +19 -0
- data/spec/suites/rspec_1/integration/test_unit_2_rails_spec.rb +18 -0
- data/spec/suites/rspec_1/spec_helper.rb +24 -0
- data/spec/suites/rspec_2/functional/any_instance_of_spec.rb +47 -0
- data/spec/suites/rspec_2/functional/dont_allow_spec.rb +12 -0
- data/spec/suites/rspec_2/functional/dsl_spec.rb +13 -0
- data/spec/suites/rspec_2/functional/instance_of_spec.rb +14 -0
- data/spec/suites/rspec_2/functional/mock_spec.rb +241 -0
- data/spec/suites/rspec_2/functional/proxy_spec.rb +136 -0
- data/spec/suites/rspec_2/functional/spy_spec.rb +41 -0
- data/spec/suites/rspec_2/functional/strong_spec.rb +79 -0
- data/spec/suites/rspec_2/functional/stub_spec.rb +190 -0
- data/spec/suites/rspec_2/functional/wildcard_matchers_spec.rb +128 -0
- data/spec/suites/rspec_2/integration/minitest_rails_spec.rb +15 -0
- data/spec/suites/rspec_2/integration/rspec_2_spec.rb +20 -0
- data/spec/suites/rspec_2/integration/test_unit_rails_spec.rb +14 -0
- data/spec/suites/rspec_2/spec_helper.rb +27 -0
- data/spec/suites/rspec_2/support/matchers/wildcard_matcher_matchers.rb +32 -0
- data/spec/suites/rspec_2/support/shared_examples/space.rb +13 -0
- data/spec/suites/rspec_2/support/shared_examples/times_called_expectation.rb +9 -0
- data/spec/suites/rspec_2/unit/adapters/rr_methods/double_creators_spec.rb +135 -0
- data/spec/suites/rspec_2/unit/adapters/rr_methods/space_spec.rb +101 -0
- data/spec/suites/rspec_2/unit/adapters/rr_methods/wildcard_matchers_spec.rb +69 -0
- data/spec/suites/rspec_2/unit/adapters/rspec/invocation_matcher_spec.rb +297 -0
- data/spec/suites/rspec_2/unit/adapters/rspec_spec.rb +85 -0
- data/spec/suites/rspec_2/unit/core_ext/array_spec.rb +39 -0
- data/spec/suites/rspec_2/unit/core_ext/enumerable_spec.rb +81 -0
- data/spec/suites/rspec_2/unit/core_ext/hash_spec.rb +55 -0
- data/spec/suites/rspec_2/unit/core_ext/range_spec.rb +41 -0
- data/spec/suites/rspec_2/unit/core_ext/regexp_spec.rb +41 -0
- data/spec/suites/rspec_2/unit/double_definitions/child_double_definition_create_spec.rb +114 -0
- data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_blank_slate_spec.rb +93 -0
- data/spec/suites/rspec_2/unit/double_definitions/double_definition_create_spec.rb +446 -0
- data/spec/suites/rspec_2/unit/errors/rr_error_spec.rb +67 -0
- data/spec/suites/rspec_2/unit/expectations/any_argument_expectation_spec.rb +48 -0
- data/spec/suites/rspec_2/unit/expectations/anything_argument_equality_expectation_spec.rb +14 -0
- data/spec/suites/rspec_2/unit/expectations/argument_equality_expectation_spec.rb +135 -0
- data/spec/suites/rspec_2/unit/expectations/boolean_argument_equality_expectation_spec.rb +30 -0
- data/spec/suites/rspec_2/unit/expectations/hash_including_argument_equality_expectation_spec.rb +82 -0
- data/spec/suites/rspec_2/unit/expectations/satisfy_argument_equality_expectation_spec.rb +61 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/any_times_matcher_spec.rb +22 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_least_matcher_spec.rb +37 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/at_most_matcher_spec.rb +43 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/integer_matcher_spec.rb +58 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/proc_matcher_spec.rb +35 -0
- data/spec/suites/rspec_2/unit/expectations/times_called_expectation/range_matcher_spec.rb +39 -0
- data/spec/suites/rspec_2/unit/hash_with_object_id_key_spec.rb +88 -0
- data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb +545 -0
- data/spec/suites/rspec_2/unit/injections/double_injection/double_injection_verify_spec.rb +32 -0
- data/spec/suites/rspec_2/unit/proc_from_block_spec.rb +14 -0
- data/spec/suites/rspec_2/unit/rr_spec.rb +28 -0
- data/spec/suites/rspec_2/unit/space_spec.rb +595 -0
- data/spec/suites/rspec_2/unit/spy_verification_spec.rb +133 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/any_times_matcher_spec.rb +46 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/at_least_matcher_spec.rb +54 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/at_most_matcher_spec.rb +69 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/integer_matcher_spec.rb +69 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/proc_matcher_spec.rb +54 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/range_matcher_spec.rb +75 -0
- data/spec/suites/rspec_2/unit/times_called_matchers/times_called_matcher_spec.rb +117 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/anything_spec.rb +33 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb +45 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/duck_type_spec.rb +64 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/hash_including_spec.rb +64 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/is_a_spec.rb +55 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/numeric_spec.rb +46 -0
- data/spec/suites/rspec_2/unit/wildcard_matchers/satisfy_spec.rb +57 -0
- data/spec/suites/test_unit_1/integration/test_unit_1_test.rb +6 -0
- data/spec/suites/test_unit_1/test_helper.rb +7 -0
- data/spec/suites/test_unit_2/integration/test_unit_2_test.rb +6 -0
- data/spec/suites/test_unit_2/test_helper.rb +3 -0
- metadata +183 -19
- data/Gemfile +0 -9
- data/Rakefile +0 -34
- data/lib/rr/adapters/rspec2.rb +0 -30
- data/lib/rr/adapters/test_unit.rb +0 -33
- data/lib/rr/errors/argument_equality_error.rb +0 -6
- data/lib/rr/wildcard_matchers/range.rb +0 -7
- data/lib/rr/wildcard_matchers/regexp.rb +0 -7
- data/spec/runner.rb +0 -41
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Takita
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: RR is a double framework that features a rich selection of double techniques
|
15
15
|
and a terse syntax.
|
@@ -23,15 +23,25 @@ files:
|
|
23
23
|
- LICENSE
|
24
24
|
- README.md
|
25
25
|
- VERSION
|
26
|
-
-
|
27
|
-
- Rakefile
|
26
|
+
- lib/rr.rb
|
28
27
|
- lib/rr/adapters/minitest.rb
|
28
|
+
- lib/rr/adapters/minitest_active_support.rb
|
29
|
+
- lib/rr/adapters/none.rb
|
29
30
|
- lib/rr/adapters/rr_methods.rb
|
30
|
-
- lib/rr/adapters/rspec.rb
|
31
|
-
- lib/rr/adapters/
|
32
|
-
- lib/rr/adapters/
|
31
|
+
- lib/rr/adapters/rspec/invocation_matcher.rb
|
32
|
+
- lib/rr/adapters/rspec_1.rb
|
33
|
+
- lib/rr/adapters/rspec_2.rb
|
34
|
+
- lib/rr/adapters/test_unit_1.rb
|
35
|
+
- lib/rr/adapters/test_unit_2.rb
|
36
|
+
- lib/rr/adapters/test_unit_2_active_support.rb
|
37
|
+
- lib/rr/autohook.rb
|
33
38
|
- lib/rr/blank_slate.rb
|
34
39
|
- lib/rr/class_instance_method_defined.rb
|
40
|
+
- lib/rr/core_ext/array.rb
|
41
|
+
- lib/rr/core_ext/enumerable.rb
|
42
|
+
- lib/rr/core_ext/hash.rb
|
43
|
+
- lib/rr/core_ext/range.rb
|
44
|
+
- lib/rr/core_ext/regexp.rb
|
35
45
|
- lib/rr/double.rb
|
36
46
|
- lib/rr/double_definitions/child_double_definition_create.rb
|
37
47
|
- lib/rr/double_definitions/double_definition.rb
|
@@ -53,7 +63,7 @@ files:
|
|
53
63
|
- lib/rr/double_definitions/strategies/verification/stub.rb
|
54
64
|
- lib/rr/double_definitions/strategies/verification/verification_strategy.rb
|
55
65
|
- lib/rr/double_matches.rb
|
56
|
-
- lib/rr/errors
|
66
|
+
- lib/rr/errors.rb
|
57
67
|
- lib/rr/errors/double_definition_error.rb
|
58
68
|
- lib/rr/errors/double_not_found_error.rb
|
59
69
|
- lib/rr/errors/double_order_error.rb
|
@@ -91,18 +101,95 @@ files:
|
|
91
101
|
- lib/rr/times_called_matchers/terminal.rb
|
92
102
|
- lib/rr/times_called_matchers/times_called_matcher.rb
|
93
103
|
- lib/rr/version.rb
|
104
|
+
- lib/rr/wildcard_matchers.rb
|
94
105
|
- lib/rr/wildcard_matchers/anything.rb
|
95
106
|
- lib/rr/wildcard_matchers/boolean.rb
|
96
107
|
- lib/rr/wildcard_matchers/duck_type.rb
|
97
108
|
- lib/rr/wildcard_matchers/hash_including.rb
|
98
109
|
- lib/rr/wildcard_matchers/is_a.rb
|
99
110
|
- lib/rr/wildcard_matchers/numeric.rb
|
100
|
-
- lib/rr/wildcard_matchers/range.rb
|
101
|
-
- lib/rr/wildcard_matchers/regexp.rb
|
102
111
|
- lib/rr/wildcard_matchers/satisfy.rb
|
103
|
-
- lib/rr/
|
104
|
-
-
|
105
|
-
- spec/
|
112
|
+
- lib/rr/without_autohook.rb
|
113
|
+
- rr.gemspec
|
114
|
+
- spec/global_helper.rb
|
115
|
+
- spec/suite.rb
|
116
|
+
- spec/suites/common/adapter_tests.rb
|
117
|
+
- spec/suites/common/rails_integration_test.rb
|
118
|
+
- spec/suites/common/test_unit_tests.rb
|
119
|
+
- spec/suites/minitest/integration/minitest_test.rb
|
120
|
+
- spec/suites/minitest/test_helper.rb
|
121
|
+
- spec/suites/rspec_1/integration/rspec_1_spec.rb
|
122
|
+
- spec/suites/rspec_1/integration/test_unit_1_rails_spec.rb
|
123
|
+
- spec/suites/rspec_1/integration/test_unit_2_rails_spec.rb
|
124
|
+
- spec/suites/rspec_1/spec_helper.rb
|
125
|
+
- spec/suites/rspec_2/functional/any_instance_of_spec.rb
|
126
|
+
- spec/suites/rspec_2/functional/dont_allow_spec.rb
|
127
|
+
- spec/suites/rspec_2/functional/dsl_spec.rb
|
128
|
+
- spec/suites/rspec_2/functional/instance_of_spec.rb
|
129
|
+
- spec/suites/rspec_2/functional/mock_spec.rb
|
130
|
+
- spec/suites/rspec_2/functional/proxy_spec.rb
|
131
|
+
- spec/suites/rspec_2/functional/spy_spec.rb
|
132
|
+
- spec/suites/rspec_2/functional/strong_spec.rb
|
133
|
+
- spec/suites/rspec_2/functional/stub_spec.rb
|
134
|
+
- spec/suites/rspec_2/functional/wildcard_matchers_spec.rb
|
135
|
+
- spec/suites/rspec_2/integration/minitest_rails_spec.rb
|
136
|
+
- spec/suites/rspec_2/integration/rspec_2_spec.rb
|
137
|
+
- spec/suites/rspec_2/integration/test_unit_rails_spec.rb
|
138
|
+
- spec/suites/rspec_2/spec_helper.rb
|
139
|
+
- spec/suites/rspec_2/support/matchers/wildcard_matcher_matchers.rb
|
140
|
+
- spec/suites/rspec_2/support/shared_examples/space.rb
|
141
|
+
- spec/suites/rspec_2/support/shared_examples/times_called_expectation.rb
|
142
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/double_creators_spec.rb
|
143
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/space_spec.rb
|
144
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/wildcard_matchers_spec.rb
|
145
|
+
- spec/suites/rspec_2/unit/adapters/rspec/invocation_matcher_spec.rb
|
146
|
+
- spec/suites/rspec_2/unit/adapters/rspec_spec.rb
|
147
|
+
- spec/suites/rspec_2/unit/core_ext/array_spec.rb
|
148
|
+
- spec/suites/rspec_2/unit/core_ext/enumerable_spec.rb
|
149
|
+
- spec/suites/rspec_2/unit/core_ext/hash_spec.rb
|
150
|
+
- spec/suites/rspec_2/unit/core_ext/range_spec.rb
|
151
|
+
- spec/suites/rspec_2/unit/core_ext/regexp_spec.rb
|
152
|
+
- spec/suites/rspec_2/unit/double_definitions/child_double_definition_create_spec.rb
|
153
|
+
- spec/suites/rspec_2/unit/double_definitions/double_definition_create_blank_slate_spec.rb
|
154
|
+
- spec/suites/rspec_2/unit/double_definitions/double_definition_create_spec.rb
|
155
|
+
- spec/suites/rspec_2/unit/errors/rr_error_spec.rb
|
156
|
+
- spec/suites/rspec_2/unit/expectations/any_argument_expectation_spec.rb
|
157
|
+
- spec/suites/rspec_2/unit/expectations/anything_argument_equality_expectation_spec.rb
|
158
|
+
- spec/suites/rspec_2/unit/expectations/argument_equality_expectation_spec.rb
|
159
|
+
- spec/suites/rspec_2/unit/expectations/boolean_argument_equality_expectation_spec.rb
|
160
|
+
- spec/suites/rspec_2/unit/expectations/hash_including_argument_equality_expectation_spec.rb
|
161
|
+
- spec/suites/rspec_2/unit/expectations/satisfy_argument_equality_expectation_spec.rb
|
162
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/any_times_matcher_spec.rb
|
163
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/at_least_matcher_spec.rb
|
164
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/at_most_matcher_spec.rb
|
165
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/integer_matcher_spec.rb
|
166
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/proc_matcher_spec.rb
|
167
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/range_matcher_spec.rb
|
168
|
+
- spec/suites/rspec_2/unit/hash_with_object_id_key_spec.rb
|
169
|
+
- spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb
|
170
|
+
- spec/suites/rspec_2/unit/injections/double_injection/double_injection_verify_spec.rb
|
171
|
+
- spec/suites/rspec_2/unit/proc_from_block_spec.rb
|
172
|
+
- spec/suites/rspec_2/unit/rr_spec.rb
|
173
|
+
- spec/suites/rspec_2/unit/space_spec.rb
|
174
|
+
- spec/suites/rspec_2/unit/spy_verification_spec.rb
|
175
|
+
- spec/suites/rspec_2/unit/times_called_matchers/any_times_matcher_spec.rb
|
176
|
+
- spec/suites/rspec_2/unit/times_called_matchers/at_least_matcher_spec.rb
|
177
|
+
- spec/suites/rspec_2/unit/times_called_matchers/at_most_matcher_spec.rb
|
178
|
+
- spec/suites/rspec_2/unit/times_called_matchers/integer_matcher_spec.rb
|
179
|
+
- spec/suites/rspec_2/unit/times_called_matchers/proc_matcher_spec.rb
|
180
|
+
- spec/suites/rspec_2/unit/times_called_matchers/range_matcher_spec.rb
|
181
|
+
- spec/suites/rspec_2/unit/times_called_matchers/times_called_matcher_spec.rb
|
182
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/anything_spec.rb
|
183
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
|
184
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/duck_type_spec.rb
|
185
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/hash_including_spec.rb
|
186
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/is_a_spec.rb
|
187
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/numeric_spec.rb
|
188
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/satisfy_spec.rb
|
189
|
+
- spec/suites/test_unit_1/integration/test_unit_1_test.rb
|
190
|
+
- spec/suites/test_unit_1/test_helper.rb
|
191
|
+
- spec/suites/test_unit_2/integration/test_unit_2_test.rb
|
192
|
+
- spec/suites/test_unit_2/test_helper.rb
|
106
193
|
homepage: http://rr.github.com/rr
|
107
194
|
licenses:
|
108
195
|
- MIT
|
@@ -113,21 +200,98 @@ require_paths:
|
|
113
200
|
- lib
|
114
201
|
required_ruby_version: !ruby/object:Gem::Requirement
|
115
202
|
requirements:
|
116
|
-
- -
|
203
|
+
- - '>='
|
117
204
|
- !ruby/object:Gem::Version
|
118
205
|
version: '0'
|
119
206
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
207
|
requirements:
|
121
|
-
- -
|
208
|
+
- - '>'
|
122
209
|
- !ruby/object:Gem::Version
|
123
|
-
version:
|
210
|
+
version: 1.3.1
|
124
211
|
requirements: []
|
125
212
|
rubyforge_project:
|
126
|
-
rubygems_version: 2.0.
|
213
|
+
rubygems_version: 2.0.0
|
127
214
|
signing_key:
|
128
215
|
specification_version: 4
|
129
216
|
summary: RR is a double framework that features a rich selection of double techniques
|
130
217
|
and a terse syntax.
|
131
218
|
test_files:
|
132
|
-
- spec/
|
133
|
-
|
219
|
+
- spec/global_helper.rb
|
220
|
+
- spec/suite.rb
|
221
|
+
- spec/suites/common/adapter_tests.rb
|
222
|
+
- spec/suites/common/rails_integration_test.rb
|
223
|
+
- spec/suites/common/test_unit_tests.rb
|
224
|
+
- spec/suites/minitest/integration/minitest_test.rb
|
225
|
+
- spec/suites/minitest/test_helper.rb
|
226
|
+
- spec/suites/rspec_1/integration/rspec_1_spec.rb
|
227
|
+
- spec/suites/rspec_1/integration/test_unit_1_rails_spec.rb
|
228
|
+
- spec/suites/rspec_1/integration/test_unit_2_rails_spec.rb
|
229
|
+
- spec/suites/rspec_1/spec_helper.rb
|
230
|
+
- spec/suites/rspec_2/functional/any_instance_of_spec.rb
|
231
|
+
- spec/suites/rspec_2/functional/dont_allow_spec.rb
|
232
|
+
- spec/suites/rspec_2/functional/dsl_spec.rb
|
233
|
+
- spec/suites/rspec_2/functional/instance_of_spec.rb
|
234
|
+
- spec/suites/rspec_2/functional/mock_spec.rb
|
235
|
+
- spec/suites/rspec_2/functional/proxy_spec.rb
|
236
|
+
- spec/suites/rspec_2/functional/spy_spec.rb
|
237
|
+
- spec/suites/rspec_2/functional/strong_spec.rb
|
238
|
+
- spec/suites/rspec_2/functional/stub_spec.rb
|
239
|
+
- spec/suites/rspec_2/functional/wildcard_matchers_spec.rb
|
240
|
+
- spec/suites/rspec_2/integration/minitest_rails_spec.rb
|
241
|
+
- spec/suites/rspec_2/integration/rspec_2_spec.rb
|
242
|
+
- spec/suites/rspec_2/integration/test_unit_rails_spec.rb
|
243
|
+
- spec/suites/rspec_2/spec_helper.rb
|
244
|
+
- spec/suites/rspec_2/support/matchers/wildcard_matcher_matchers.rb
|
245
|
+
- spec/suites/rspec_2/support/shared_examples/space.rb
|
246
|
+
- spec/suites/rspec_2/support/shared_examples/times_called_expectation.rb
|
247
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/double_creators_spec.rb
|
248
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/space_spec.rb
|
249
|
+
- spec/suites/rspec_2/unit/adapters/rr_methods/wildcard_matchers_spec.rb
|
250
|
+
- spec/suites/rspec_2/unit/adapters/rspec/invocation_matcher_spec.rb
|
251
|
+
- spec/suites/rspec_2/unit/adapters/rspec_spec.rb
|
252
|
+
- spec/suites/rspec_2/unit/core_ext/array_spec.rb
|
253
|
+
- spec/suites/rspec_2/unit/core_ext/enumerable_spec.rb
|
254
|
+
- spec/suites/rspec_2/unit/core_ext/hash_spec.rb
|
255
|
+
- spec/suites/rspec_2/unit/core_ext/range_spec.rb
|
256
|
+
- spec/suites/rspec_2/unit/core_ext/regexp_spec.rb
|
257
|
+
- spec/suites/rspec_2/unit/double_definitions/child_double_definition_create_spec.rb
|
258
|
+
- spec/suites/rspec_2/unit/double_definitions/double_definition_create_blank_slate_spec.rb
|
259
|
+
- spec/suites/rspec_2/unit/double_definitions/double_definition_create_spec.rb
|
260
|
+
- spec/suites/rspec_2/unit/errors/rr_error_spec.rb
|
261
|
+
- spec/suites/rspec_2/unit/expectations/any_argument_expectation_spec.rb
|
262
|
+
- spec/suites/rspec_2/unit/expectations/anything_argument_equality_expectation_spec.rb
|
263
|
+
- spec/suites/rspec_2/unit/expectations/argument_equality_expectation_spec.rb
|
264
|
+
- spec/suites/rspec_2/unit/expectations/boolean_argument_equality_expectation_spec.rb
|
265
|
+
- spec/suites/rspec_2/unit/expectations/hash_including_argument_equality_expectation_spec.rb
|
266
|
+
- spec/suites/rspec_2/unit/expectations/satisfy_argument_equality_expectation_spec.rb
|
267
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/any_times_matcher_spec.rb
|
268
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/at_least_matcher_spec.rb
|
269
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/at_most_matcher_spec.rb
|
270
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/integer_matcher_spec.rb
|
271
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/proc_matcher_spec.rb
|
272
|
+
- spec/suites/rspec_2/unit/expectations/times_called_expectation/range_matcher_spec.rb
|
273
|
+
- spec/suites/rspec_2/unit/hash_with_object_id_key_spec.rb
|
274
|
+
- spec/suites/rspec_2/unit/injections/double_injection/double_injection_spec.rb
|
275
|
+
- spec/suites/rspec_2/unit/injections/double_injection/double_injection_verify_spec.rb
|
276
|
+
- spec/suites/rspec_2/unit/proc_from_block_spec.rb
|
277
|
+
- spec/suites/rspec_2/unit/rr_spec.rb
|
278
|
+
- spec/suites/rspec_2/unit/space_spec.rb
|
279
|
+
- spec/suites/rspec_2/unit/spy_verification_spec.rb
|
280
|
+
- spec/suites/rspec_2/unit/times_called_matchers/any_times_matcher_spec.rb
|
281
|
+
- spec/suites/rspec_2/unit/times_called_matchers/at_least_matcher_spec.rb
|
282
|
+
- spec/suites/rspec_2/unit/times_called_matchers/at_most_matcher_spec.rb
|
283
|
+
- spec/suites/rspec_2/unit/times_called_matchers/integer_matcher_spec.rb
|
284
|
+
- spec/suites/rspec_2/unit/times_called_matchers/proc_matcher_spec.rb
|
285
|
+
- spec/suites/rspec_2/unit/times_called_matchers/range_matcher_spec.rb
|
286
|
+
- spec/suites/rspec_2/unit/times_called_matchers/times_called_matcher_spec.rb
|
287
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/anything_spec.rb
|
288
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/boolean_spec.rb
|
289
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/duck_type_spec.rb
|
290
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/hash_including_spec.rb
|
291
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/is_a_spec.rb
|
292
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/numeric_spec.rb
|
293
|
+
- spec/suites/rspec_2/unit/wildcard_matchers/satisfy_spec.rb
|
294
|
+
- spec/suites/test_unit_1/integration/test_unit_1_test.rb
|
295
|
+
- spec/suites/test_unit_1/test_helper.rb
|
296
|
+
- spec/suites/test_unit_2/integration/test_unit_2_test.rb
|
297
|
+
- spec/suites/test_unit_2/test_helper.rb
|
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'rake'
|
3
|
-
|
4
|
-
require File.expand_path('../spec/runner', __FILE__)
|
5
|
-
|
6
|
-
task :default => :spec
|
7
|
-
|
8
|
-
desc "Runs all of the tests"
|
9
|
-
task :spec do
|
10
|
-
ARGV.clear
|
11
|
-
unless SuitesRunner.new.run
|
12
|
-
raise "Spec Suite failed"
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
namespace :spec do
|
17
|
-
SuitesRunner::TEST_SUITES.each do |path, class_fragment, desc|
|
18
|
-
desc "Runs all of the #{desc} tests"
|
19
|
-
task path do
|
20
|
-
ARGV.clear
|
21
|
-
require File.expand_path("../spec/suites/#{path}/runner.rb", __FILE__)
|
22
|
-
unless Object.const_get("#{class_fragment}SuiteRunner").new.run
|
23
|
-
raise "#{desc} Suite failed"
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
end
|
28
|
-
|
29
|
-
begin
|
30
|
-
require 'bundler'
|
31
|
-
require 'bundler/gem_tasks'
|
32
|
-
rescue LoadError
|
33
|
-
puts "Bundler isn't installed. Run `gem install bundler` to get it."
|
34
|
-
end
|
data/lib/rr/adapters/rspec2.rb
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
module RR
|
2
|
-
module Adapters
|
3
|
-
module RSpec2
|
4
|
-
def self.included(mod)
|
5
|
-
patterns = RSpec.configuration.backtrace_clean_patterns
|
6
|
-
unless patterns.include?(RR::Errors::BACKTRACE_IDENTIFIER)
|
7
|
-
patterns.push(RR::Errors::BACKTRACE_IDENTIFIER)
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
include RRMethods
|
12
|
-
|
13
|
-
def setup_mocks_for_rspec
|
14
|
-
RR.reset
|
15
|
-
end
|
16
|
-
|
17
|
-
def verify_mocks_for_rspec
|
18
|
-
RR.verify
|
19
|
-
end
|
20
|
-
|
21
|
-
def teardown_mocks_for_rspec
|
22
|
-
RR.reset
|
23
|
-
end
|
24
|
-
|
25
|
-
def have_received(method = nil)
|
26
|
-
RR::Adapters::Rspec::InvocationMatcher.new(method)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
module RR
|
2
|
-
module Adapters
|
3
|
-
module TestUnit
|
4
|
-
include RRMethods
|
5
|
-
|
6
|
-
def self.included(mod)
|
7
|
-
RR.trim_backtrace = true
|
8
|
-
|
9
|
-
mod.class_eval do
|
10
|
-
unless instance_methods.detect {|method_name| method_name.to_sym == :setup_with_rr}
|
11
|
-
alias_method :setup_without_rr, :setup
|
12
|
-
def setup_with_rr
|
13
|
-
setup_without_rr
|
14
|
-
RR.reset
|
15
|
-
end
|
16
|
-
alias_method :setup, :setup_with_rr
|
17
|
-
|
18
|
-
alias_method :teardown_without_rr, :teardown
|
19
|
-
def teardown_with_rr
|
20
|
-
RR.verify
|
21
|
-
teardown_without_rr
|
22
|
-
end
|
23
|
-
alias_method :teardown, :teardown_with_rr
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def assert_received(subject, &block)
|
29
|
-
block.call(received(subject)).call
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
data/spec/runner.rb
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'session'
|
2
|
-
|
3
|
-
class SuitesRunner
|
4
|
-
TEST_SUITES = [
|
5
|
-
[:rspec, 'RSpec', 'RSpec'],
|
6
|
-
[:test_unit, 'TestUnit', 'Test::Unit'],
|
7
|
-
[:minitest, 'Minitest', 'MiniTest']
|
8
|
-
]
|
9
|
-
|
10
|
-
attr_reader :bash
|
11
|
-
|
12
|
-
def initialize
|
13
|
-
@bash = Session::Bash.new
|
14
|
-
end
|
15
|
-
|
16
|
-
def run
|
17
|
-
TEST_SUITES.each_with_index do |(path, class_fragment, desc), i|
|
18
|
-
puts "----------------" unless i == 0
|
19
|
-
run_examples(path, class_fragment, desc)
|
20
|
-
puts
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def run_examples(path, class_fragment, desc)
|
25
|
-
path = File.expand_path("../suites/#{path}/runner.rb", __FILE__)
|
26
|
-
# From http://www.eglug.org/node/946
|
27
|
-
bash.execute "exec 3>&1", :out => STDOUT, :err => STDERR
|
28
|
-
# XXX: why are we checking for this warning here...
|
29
|
-
bash.execute "ruby -W #{path} 2>&1 >&3 3>&- | grep -v 'warning: useless use of' 3>&-; STATUS=${PIPESTATUS[0]}", :out => STDOUT, :err => STDERR
|
30
|
-
status = bash.execute("echo $STATUS")[0].to_s.strip.to_i
|
31
|
-
bash.execute "exec 3>&-", :out => STDOUT, :err => STDERR
|
32
|
-
unless status == 0
|
33
|
-
raise "#{desc} Suite Failed"
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
if $0 == __FILE__
|
39
|
-
SuitesRunner.new.run
|
40
|
-
end
|
41
|
-
|