mocha 0.14.0 → 1.0.0.alpha
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +28 -8
- data/RELEASE.md +40 -0
- data/bin/build-matrix +71 -0
- data/lib/mocha.rb +0 -7
- data/lib/mocha/any_instance_method.rb +2 -2
- data/lib/mocha/class_method.rb +5 -2
- data/lib/mocha/detection/mini_test.rb +25 -0
- data/lib/mocha/detection/test_unit.rb +29 -0
- data/lib/mocha/expectation_list.rb +6 -2
- data/lib/mocha/integration.rb +2 -2
- data/lib/mocha/integration/mini_test.rb +6 -11
- data/lib/mocha/integration/test_unit.rb +4 -9
- data/lib/mocha/mini_test.rb +3 -0
- data/lib/mocha/mock.rb +73 -8
- data/lib/mocha/mockery.rb +3 -2
- data/lib/mocha/object_methods.rb +4 -2
- data/lib/mocha/parameter_matchers/responds_with.rb +1 -1
- data/lib/mocha/receivers.rb +49 -0
- data/lib/mocha/setup.rb +0 -1
- data/lib/mocha/test_unit.rb +3 -0
- data/lib/mocha/unexpected_invocation.rb +10 -5
- data/lib/mocha/version.rb +1 -1
- data/test/acceptance/stub_any_instance_method_defined_on_superclass_test.rb +34 -0
- data/test/acceptance/stub_any_instance_method_test.rb +1 -0
- data/test/acceptance/stub_class_method_defined_on_class_test.rb +3 -0
- data/test/acceptance/stub_class_method_defined_on_superclass_test.rb +40 -3
- data/test/acceptance/stub_instance_method_defined_on_class_test.rb +3 -0
- data/test/acceptance/unexpected_invocation_test.rb +25 -0
- data/test/assertions.rb +6 -0
- data/test/integration/mini_test_test.rb +4 -18
- data/test/integration/test_unit_test.rb +2 -3
- data/test/test_helper.rb +6 -2
- data/test/test_runner.rb +22 -18
- data/test/unit/expectation_list_test.rb +11 -0
- data/test/unit/parameter_matchers/responds_with_test.rb +7 -0
- data/test/unit/receivers_test.rb +66 -0
- data/yard-templates/default/layout/html/google_analytics.erb +9 -9
- metadata +93 -109
- data/build-matrix.rb +0 -71
@@ -68,4 +68,15 @@ class ExpectationListTest < Mocha::TestCase
|
|
68
68
|
assert_same expectation1, expectation_list.match_allowing_invocation(:my_method)
|
69
69
|
end
|
70
70
|
|
71
|
+
def test_should_combine_two_expectation_lists_into_one
|
72
|
+
expectation_list1 = ExpectationList.new
|
73
|
+
expectation_list2 = ExpectationList.new
|
74
|
+
expectation1 = Expectation.new(nil, :my_method)
|
75
|
+
expectation2 = Expectation.new(nil, :my_method)
|
76
|
+
expectation_list1.add(expectation1)
|
77
|
+
expectation_list2.add(expectation2)
|
78
|
+
expectation_list = expectation_list1 + expectation_list2
|
79
|
+
assert_equal [expectation1, expectation2], expectation_list.to_a
|
80
|
+
end
|
81
|
+
|
71
82
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require File.expand_path('../../../test_helper', __FILE__)
|
2
2
|
|
3
3
|
require 'mocha/parameter_matchers/responds_with'
|
4
|
+
require 'mocha/parameter_matchers/object'
|
4
5
|
require 'mocha/inspect'
|
5
6
|
|
6
7
|
class RespondsWithTest < Mocha::TestCase
|
@@ -17,6 +18,12 @@ class RespondsWithTest < Mocha::TestCase
|
|
17
18
|
assert !matcher.matches?(['bar'])
|
18
19
|
end
|
19
20
|
|
21
|
+
def test_should_match_parameter_responding_with_nested_responds_with_matcher
|
22
|
+
matcher = responds_with(:foo, responds_with(:bar, 'baz'))
|
23
|
+
object = Class.new { def foo; Class.new { def bar; 'baz'; end }.new; end }.new
|
24
|
+
assert matcher.matches?([object])
|
25
|
+
end
|
26
|
+
|
20
27
|
def test_should_describe_matcher
|
21
28
|
matcher = responds_with(:foo, :bar)
|
22
29
|
assert_equal 'responds_with(:foo, :bar)', matcher.mocha_inspect
|
@@ -0,0 +1,66 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
require 'mocha/receivers'
|
3
|
+
|
4
|
+
class ObjectReceiverTest < Mocha::TestCase
|
5
|
+
include Mocha
|
6
|
+
|
7
|
+
class FakeObject < Struct.new(:mocha)
|
8
|
+
def is_a?(klass)
|
9
|
+
false
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
class FakeClass < Struct.new(:superclass, :mocha)
|
14
|
+
def is_a?(klass)
|
15
|
+
klass == Class
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_mocks_returns_mock_for_object
|
20
|
+
object = FakeObject.new(:mocha)
|
21
|
+
receiver = ObjectReceiver.new(object)
|
22
|
+
assert_equal [:mocha], receiver.mocks
|
23
|
+
end
|
24
|
+
|
25
|
+
def test_mocks_returns_mocks_for_class_and_its_superclasses
|
26
|
+
grandparent = FakeClass.new(nil, :grandparent_mocha)
|
27
|
+
parent = FakeClass.new(grandparent, :parent_mocha)
|
28
|
+
klass = FakeClass.new(parent, :mocha)
|
29
|
+
receiver = ObjectReceiver.new(klass)
|
30
|
+
assert_equal [:mocha, :parent_mocha, :grandparent_mocha], receiver.mocks
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
class AnyInstanceReceiverTest < Mocha::TestCase
|
35
|
+
include Mocha
|
36
|
+
|
37
|
+
class FakeAnyInstanceClass
|
38
|
+
attr_reader :superclass
|
39
|
+
|
40
|
+
def initialize(superclass, mocha)
|
41
|
+
@superclass, @mocha = superclass, mocha
|
42
|
+
end
|
43
|
+
|
44
|
+
def any_instance
|
45
|
+
Struct.new(:mocha).new(@mocha)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def test_mocks_returns_mocks_for_class_and_its_superclasses
|
50
|
+
grandparent = FakeAnyInstanceClass.new(nil, :grandparent_mocha)
|
51
|
+
parent = FakeAnyInstanceClass.new(grandparent, :parent_mocha)
|
52
|
+
klass = FakeAnyInstanceClass.new(parent, :mocha)
|
53
|
+
receiver = AnyInstanceReceiver.new(klass)
|
54
|
+
assert_equal [:mocha, :parent_mocha, :grandparent_mocha], receiver.mocks
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
class DefaultReceiverTest < Mocha::TestCase
|
59
|
+
include Mocha
|
60
|
+
|
61
|
+
def test_mocks_returns_mock
|
62
|
+
mock = :mocha
|
63
|
+
receiver = DefaultReceiver.new(mock)
|
64
|
+
assert_equal [:mocha], receiver.mocks
|
65
|
+
end
|
66
|
+
end
|
@@ -1,11 +1,11 @@
|
|
1
1
|
<script src="/javascripts/app.js" type="text/javascript" charset="utf-8"></script>
|
2
2
|
|
3
|
-
<script
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
<script>
|
4
|
+
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
5
|
+
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
6
|
+
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
7
|
+
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
|
8
|
+
|
9
|
+
ga('create', '<%= ENV['GOOGLE_ANALYTICS_WEB_PROPERTY_ID'] %>', 'gofreerange.com');
|
10
|
+
ga('send', 'pageview');
|
11
|
+
</script>
|
metadata
CHANGED
@@ -1,115 +1,101 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: mocha
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 14
|
9
|
-
- 0
|
10
|
-
version: 0.14.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.alpha
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- James Mead
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
23
|
-
none: false
|
24
|
-
requirements:
|
25
|
-
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
hash: 29
|
28
|
-
segments:
|
29
|
-
- 0
|
30
|
-
- 0
|
31
|
-
- 1
|
32
|
-
version: 0.0.1
|
33
|
-
version_requirements: *id001
|
11
|
+
date: 2013-12-31 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
34
14
|
name: metaclass
|
35
|
-
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.1
|
36
20
|
type: :runtime
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ">="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 3
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
version: "0"
|
47
|
-
version_requirements: *id002
|
48
|
-
name: rake
|
49
21
|
prerelease: false
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
requirements:
|
55
|
-
- - ~>
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
hash: 29
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
- 0
|
61
|
-
- 1
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
62
26
|
version: 0.0.1
|
63
|
-
|
64
|
-
name:
|
65
|
-
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
66
34
|
type: :development
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
requirements:
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
71
38
|
- - ">="
|
72
|
-
- !ruby/object:Gem::Version
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: introspection
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.0.1
|
48
|
+
type: :development
|
79
49
|
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.0.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: yard
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
80
62
|
type: :development
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
84
|
-
requirements:
|
85
|
-
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
hash: 1
|
88
|
-
segments:
|
89
|
-
- 1
|
90
|
-
version: "1"
|
91
|
-
version_requirements: *id005
|
92
|
-
name: redcarpet
|
93
63
|
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: redcarpet
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1'
|
94
76
|
type: :development
|
95
|
-
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1'
|
83
|
+
description: Mocking and stubbing library with JMock/SchMock syntax, which allows
|
84
|
+
mocking and stubbing of methods on real (non-mock) classes.
|
96
85
|
email: mocha-developer@googlegroups.com
|
97
86
|
executables: []
|
98
|
-
|
99
87
|
extensions: []
|
100
|
-
|
101
88
|
extra_rdoc_files: []
|
102
|
-
|
103
|
-
|
104
|
-
- .
|
105
|
-
- .yardopts
|
89
|
+
files:
|
90
|
+
- ".gemtest"
|
91
|
+
- ".yardopts"
|
106
92
|
- COPYING.md
|
107
93
|
- Gemfile
|
108
94
|
- MIT-LICENSE.md
|
109
95
|
- README.md
|
110
96
|
- RELEASE.md
|
111
97
|
- Rakefile
|
112
|
-
- build-matrix
|
98
|
+
- bin/build-matrix
|
113
99
|
- gemfiles/Gemfile.minitest.1.3.0
|
114
100
|
- gemfiles/Gemfile.minitest.1.4.0
|
115
101
|
- gemfiles/Gemfile.minitest.1.4.1
|
@@ -138,6 +124,8 @@ files:
|
|
138
124
|
- lib/mocha/configuration.rb
|
139
125
|
- lib/mocha/debug.rb
|
140
126
|
- lib/mocha/deprecation.rb
|
127
|
+
- lib/mocha/detection/mini_test.rb
|
128
|
+
- lib/mocha/detection/test_unit.rb
|
141
129
|
- lib/mocha/exception_raiser.rb
|
142
130
|
- lib/mocha/expectation.rb
|
143
131
|
- lib/mocha/expectation_error.rb
|
@@ -175,6 +163,7 @@ files:
|
|
175
163
|
- lib/mocha/is_a.rb
|
176
164
|
- lib/mocha/logger.rb
|
177
165
|
- lib/mocha/method_matcher.rb
|
166
|
+
- lib/mocha/mini_test.rb
|
178
167
|
- lib/mocha/mock.rb
|
179
168
|
- lib/mocha/mockery.rb
|
180
169
|
- lib/mocha/module_method.rb
|
@@ -207,6 +196,7 @@ files:
|
|
207
196
|
- lib/mocha/parameter_matchers/yaml_equivalent.rb
|
208
197
|
- lib/mocha/parameters_matcher.rb
|
209
198
|
- lib/mocha/pretty_parameters.rb
|
199
|
+
- lib/mocha/receivers.rb
|
210
200
|
- lib/mocha/return_values.rb
|
211
201
|
- lib/mocha/sequence.rb
|
212
202
|
- lib/mocha/setup.rb
|
@@ -215,6 +205,7 @@ files:
|
|
215
205
|
- lib/mocha/standalone.rb
|
216
206
|
- lib/mocha/state_machine.rb
|
217
207
|
- lib/mocha/stubbing_error.rb
|
208
|
+
- lib/mocha/test_unit.rb
|
218
209
|
- lib/mocha/thrower.rb
|
219
210
|
- lib/mocha/unexpected_invocation.rb
|
220
211
|
- lib/mocha/version.rb
|
@@ -244,6 +235,7 @@ files:
|
|
244
235
|
- test/acceptance/return_value_test.rb
|
245
236
|
- test/acceptance/sequence_test.rb
|
246
237
|
- test/acceptance/states_test.rb
|
238
|
+
- test/acceptance/stub_any_instance_method_defined_on_superclass_test.rb
|
247
239
|
- test/acceptance/stub_any_instance_method_test.rb
|
248
240
|
- test/acceptance/stub_class_method_defined_on_active_record_association_proxy_test.rb
|
249
241
|
- test/acceptance/stub_class_method_defined_on_class_test.rb
|
@@ -276,7 +268,9 @@ files:
|
|
276
268
|
- test/acceptance/stubbing_on_non_mock_object_test.rb
|
277
269
|
- test/acceptance/stubbing_same_class_method_on_parent_and_child_classes_test.rb
|
278
270
|
- test/acceptance/throw_test.rb
|
271
|
+
- test/acceptance/unexpected_invocation_test.rb
|
279
272
|
- test/acceptance/unstubbing_test.rb
|
273
|
+
- test/assertions.rb
|
280
274
|
- test/deprecation_disabler.rb
|
281
275
|
- test/execution_point.rb
|
282
276
|
- test/integration/mini_test_test.rb
|
@@ -331,6 +325,7 @@ files:
|
|
331
325
|
- test/unit/parameter_matchers/stub_matcher.rb
|
332
326
|
- test/unit/parameter_matchers/yaml_equivalent_test.rb
|
333
327
|
- test/unit/parameters_matcher_test.rb
|
328
|
+
- test/unit/receivers_test.rb
|
334
329
|
- test/unit/return_values_test.rb
|
335
330
|
- test/unit/sequence_test.rb
|
336
331
|
- test/unit/single_return_value_test.rb
|
@@ -341,39 +336,28 @@ files:
|
|
341
336
|
- test/unit/yield_parameters_test.rb
|
342
337
|
- yard-templates/default/layout/html/google_analytics.erb
|
343
338
|
- yard-templates/default/layout/html/setup.rb
|
344
|
-
has_rdoc: yard
|
345
339
|
homepage: http://gofreerange.com/mocha/docs
|
346
340
|
licenses: []
|
347
|
-
|
341
|
+
metadata: {}
|
348
342
|
post_install_message:
|
349
343
|
rdoc_options: []
|
350
|
-
|
351
|
-
require_paths:
|
344
|
+
require_paths:
|
352
345
|
- lib
|
353
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
354
|
-
|
355
|
-
requirements:
|
346
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
347
|
+
requirements:
|
356
348
|
- - ">="
|
357
|
-
- !ruby/object:Gem::Version
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
version: "0"
|
362
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
363
|
-
none: false
|
364
|
-
requirements:
|
349
|
+
- !ruby/object:Gem::Version
|
350
|
+
version: '0'
|
351
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
352
|
+
requirements:
|
365
353
|
- - ">="
|
366
|
-
- !ruby/object:Gem::Version
|
367
|
-
|
368
|
-
segments:
|
369
|
-
- 0
|
370
|
-
version: "0"
|
354
|
+
- !ruby/object:Gem::Version
|
355
|
+
version: '0'
|
371
356
|
requirements: []
|
372
|
-
|
373
357
|
rubyforge_project: mocha
|
374
|
-
rubygems_version:
|
358
|
+
rubygems_version: 2.2.0
|
375
359
|
signing_key:
|
376
360
|
specification_version: 3
|
377
361
|
summary: Mocking and stubbing library
|
378
362
|
test_files: []
|
379
|
-
|
363
|
+
has_rdoc: yard
|
data/build-matrix.rb
DELETED
@@ -1,71 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
def execute(*commands)
|
4
|
-
commands.each do |command|
|
5
|
-
system(command)
|
6
|
-
unless $?.success?
|
7
|
-
message = [
|
8
|
-
"Executing shell command failed.",
|
9
|
-
" Command: #{command}",
|
10
|
-
" Status: #{$?.exitstatus}"
|
11
|
-
].join("\n")
|
12
|
-
raise message
|
13
|
-
end
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
def reset_bundle
|
18
|
-
execute(
|
19
|
-
"rm -rf .bundle/gems",
|
20
|
-
"rm -rf gemfiles/.bundle/gems",
|
21
|
-
"rm -f *.lock",
|
22
|
-
"rm -f gemfiles/*.lock"
|
23
|
-
)
|
24
|
-
end
|
25
|
-
|
26
|
-
def with_rbenv(command)
|
27
|
-
%{export PATH="$HOME/.rbenv/bin:$PATH"; eval "$(rbenv init -)"; #{command}}
|
28
|
-
end
|
29
|
-
|
30
|
-
def run(gemfile, task = "test")
|
31
|
-
ENV["BUNDLE_GEMFILE"] = gemfile
|
32
|
-
ENV["MOCHA_OPTIONS"] = "debug"
|
33
|
-
ENV["MOCHA_NO_DOCS"] = "true"
|
34
|
-
reset_bundle
|
35
|
-
execute(
|
36
|
-
with_rbenv("bundle install --gemfile=#{gemfile}"),
|
37
|
-
with_rbenv("bundle exec rake #{task}")
|
38
|
-
)
|
39
|
-
end
|
40
|
-
|
41
|
-
EXCLUDED_RUBY_193_GEMFILES = [
|
42
|
-
"gemfiles/Gemfile.minitest.1.3.0",
|
43
|
-
"gemfiles/Gemfile.minitest.1.4.0",
|
44
|
-
"gemfiles/Gemfile.minitest.1.4.1",
|
45
|
-
"gemfiles/Gemfile.minitest.1.4.2"
|
46
|
-
]
|
47
|
-
|
48
|
-
RUBY_VERSIONS = ["1.8.7-p352", "1.9.3-p125-perf"]
|
49
|
-
|
50
|
-
RUBY_VERSIONS.each do |ruby_version|
|
51
|
-
execute("rbenv local #{ruby_version}")
|
52
|
-
reset_bundle
|
53
|
-
run("Gemfile")
|
54
|
-
execute("rbenv local --unset")
|
55
|
-
end
|
56
|
-
|
57
|
-
RUBY_VERSIONS.each do |ruby_version|
|
58
|
-
execute("rbenv local #{ruby_version}")
|
59
|
-
["test-unit", "minitest"].each do |test_library|
|
60
|
-
reset_bundle
|
61
|
-
(Dir["gemfiles/Gemfile.#{test_library}.*"] + ["Gemfile"]).each do |gemfile|
|
62
|
-
ruby_version_without_patch = ruby_version.split("-")[0]
|
63
|
-
next if (ruby_version_without_patch == "1.9.3") && EXCLUDED_RUBY_193_GEMFILES.include?(gemfile)
|
64
|
-
next if (ruby_version_without_patch == "1.8.7") && (gemfile == "Gemfile") && (test_library == "minitest")
|
65
|
-
p [ruby_version_without_patch, test_library, gemfile]
|
66
|
-
ENV['MOCHA_RUN_INTEGRATION_TESTS'] = test_library
|
67
|
-
run(gemfile)
|
68
|
-
end
|
69
|
-
end
|
70
|
-
execute("rbenv local --unset")
|
71
|
-
end
|