multi_test 0.0.3 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/History.md +5 -1
- data/Makefile +0 -0
- data/README.md +0 -0
- data/lib/multi_test.rb +5 -0
- data/lib/multi_test/assertion_library.rb +63 -0
- data/lib/multi_test/minitest_world.rb +10 -0
- data/multi_test.gemspec +1 -2
- data/test/gemfiles/activesupport-4.0.0/scenarios +1 -0
- data/test/gemfiles/activesupport-4.1.0/scenarios +1 -1
- data/test/gemfiles/minitest-5.0.1/scenarios +1 -1
- data/test/gemfiles/minitest-5.1.0/scenarios +1 -1
- data/test/gemfiles/minitest-5.2.0/scenarios +1 -1
- data/test/gemfiles/rspec-1.3.2/Gemfile +4 -0
- data/test/gemfiles/rspec-1.3.2/Gemfile.lock +12 -0
- data/test/gemfiles/rspec-1.3.2/scenarios +3 -0
- data/test/gemfiles/rspec-2.14/Gemfile +3 -0
- data/test/gemfiles/rspec-2.14/Gemfile.lock +18 -0
- data/test/gemfiles/rspec-2.14/scenarios +3 -0
- data/test/gemfiles/rspec-3.0/Gemfile +3 -0
- data/test/gemfiles/rspec-3.0/Gemfile.lock +22 -0
- data/test/gemfiles/rspec-3.0/scenarios +3 -0
- data/test/gemfiles/test-unit-2.4.8/scenarios +1 -1
- data/test/gemfiles/test-unit-2.4.9/scenarios +1 -1
- data/test/scenarios/minitest_assertions.rb +7 -0
- data/test/scenarios/require_test_unit.rb +0 -1
- data/test/scenarios/rspec_matchers.rb +7 -0
- data/test/scenarios/spec_matchers.rb +7 -0
- data/test/scenarios/test_unit_assertions.rb +6 -0
- metadata +36 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0afef8f6d5935c731cc77f5ce62112900f7f267
|
4
|
+
data.tar.gz: 01f9568a08b9855e9cf1c90ef72a2f17a39d54a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: afbb8a2df72e7fa5804ed0da863d674aa3cfb86fd63c3d4f69fea55034ee79aa8ad17c3aede614d13063585cc3d75c9eefbd44c9b3b23263ff15fc1b3b0a8417
|
7
|
+
data.tar.gz: c2c59790170b596573f972cd5175104d31bbc134cfc9ae92933feeec2c35db9d837455b04f763c1ec365b428bb5e0066620784a4bff72fe7059f3ca482619306
|
data/.travis.yml
CHANGED
data/History.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
1
|
## [v0.0.3](https://github.com/cucumber/multi_test/compare/v0.0.2...v0.0.3)
|
2
2
|
|
3
|
-
* Fix for Rails 4.1, Minitest 5.x ([#4](https://github.com/cucumber/multi_test/pull/4) Andy Lindeman
|
3
|
+
* Fix for Rails 4.1, Minitest 5.x ([#4](https://github.com/cucumber/multi_test/pull/4) Andy Lindeman)
|
4
|
+
|
5
|
+
## [v0.0.2](https://github.com/cucumber/multi_test/compare/bae4b700eb63cfb4e95f7acc35e25683f697905a...v0.0.2)
|
6
|
+
|
7
|
+
* First gem release
|
data/Makefile
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/lib/multi_test.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require 'multi_test/assertion_library'
|
1
2
|
module MultiTest
|
2
3
|
def self.disable_autorun
|
3
4
|
if defined?(Test::Unit::Runner)
|
@@ -25,4 +26,8 @@ module MultiTest
|
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
29
|
+
|
30
|
+
def self.extend_with_best_assertion_library(object)
|
31
|
+
AssertionLibrary.detect_best.extend_world(object)
|
32
|
+
end
|
28
33
|
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require 'multi_test/minitest_world'
|
2
|
+
|
3
|
+
module MultiTest
|
4
|
+
class AssertionLibrary
|
5
|
+
def self.detect_best
|
6
|
+
available.detect(&:require?)
|
7
|
+
end
|
8
|
+
|
9
|
+
def initialize(requirer, extender)
|
10
|
+
@requirer = requirer
|
11
|
+
@extender = extender
|
12
|
+
end
|
13
|
+
|
14
|
+
def require?
|
15
|
+
begin
|
16
|
+
@requirer.call
|
17
|
+
true
|
18
|
+
rescue LoadError
|
19
|
+
false
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def extend_world(world)
|
24
|
+
@extender.call(world)
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def self.available
|
30
|
+
@available ||= [
|
31
|
+
AssertionLibrary.new(
|
32
|
+
proc { require 'rspec/expectations' },
|
33
|
+
proc { |object| object.extend(::RSpec::Matchers) },
|
34
|
+
),
|
35
|
+
AssertionLibrary.new(
|
36
|
+
proc {
|
37
|
+
require 'spec/expectations'
|
38
|
+
require 'spec/runner/differs/default'
|
39
|
+
require 'ostruct'
|
40
|
+
},
|
41
|
+
proc { |object|
|
42
|
+
options = OpenStruct.new(:diff_format => :unified, :context_lines => 3)
|
43
|
+
Spec::Expectations.differ = Spec::Expectations::Differs::Default.new(options)
|
44
|
+
object.extend(Spec::Matchers)
|
45
|
+
},
|
46
|
+
),
|
47
|
+
AssertionLibrary.new(
|
48
|
+
proc { require 'minitest/assertions' },
|
49
|
+
proc { |object| object.extend(MinitestWorld) },
|
50
|
+
),
|
51
|
+
AssertionLibrary.new(
|
52
|
+
proc { require 'minitest/unit' },
|
53
|
+
proc { |object| object.extend(MiniTest::Assertions) },
|
54
|
+
),
|
55
|
+
AssertionLibrary.new(
|
56
|
+
proc { require 'test/unit/assertions' },
|
57
|
+
proc { |object| object.extend(Test::Unit::Assertions) },
|
58
|
+
),
|
59
|
+
]
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
data/multi_test.gemspec
CHANGED
@@ -1,10 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
2
|
$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
|
3
|
-
require "cucumber/platform"
|
4
3
|
|
5
4
|
Gem::Specification.new do |s|
|
6
5
|
s.name = 'multi_test'
|
7
|
-
s.version = '0.0
|
6
|
+
s.version = '0.1.0'
|
8
7
|
s.authors = ["Matt Wynne", "Steve Tooke"]
|
9
8
|
s.description = 'Wafter-thin gem to help control rogue test/unit/autorun requires'
|
10
9
|
s.summary = "multi-test-#{s.version}"
|
@@ -1,2 +1,2 @@
|
|
1
1
|
require_activesupport_testing_autorun.rb
|
2
|
-
|
2
|
+
minitest_assertions.rb
|
@@ -0,0 +1,18 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.2.5)
|
5
|
+
rspec (2.14.1)
|
6
|
+
rspec-core (~> 2.14.0)
|
7
|
+
rspec-expectations (~> 2.14.0)
|
8
|
+
rspec-mocks (~> 2.14.0)
|
9
|
+
rspec-core (2.14.8)
|
10
|
+
rspec-expectations (2.14.5)
|
11
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
12
|
+
rspec-mocks (2.14.6)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
rspec (~> 2.14)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
GEM
|
2
|
+
remote: https://rubygems.org/
|
3
|
+
specs:
|
4
|
+
diff-lcs (1.2.5)
|
5
|
+
rspec (3.0.0.beta2)
|
6
|
+
rspec-core (= 3.0.0.beta2)
|
7
|
+
rspec-expectations (= 3.0.0.beta2)
|
8
|
+
rspec-mocks (= 3.0.0.beta2)
|
9
|
+
rspec-core (3.0.0.beta2)
|
10
|
+
rspec-support (= 3.0.0.beta2)
|
11
|
+
rspec-expectations (3.0.0.beta2)
|
12
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
13
|
+
rspec-support (= 3.0.0.beta2)
|
14
|
+
rspec-mocks (3.0.0.beta2)
|
15
|
+
rspec-support (= 3.0.0.beta2)
|
16
|
+
rspec-support (3.0.0.beta2)
|
17
|
+
|
18
|
+
PLATFORMS
|
19
|
+
ruby
|
20
|
+
|
21
|
+
DEPENDENCIES
|
22
|
+
rspec (~> 3.0.0.beta)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: multi_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Wynne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-03-16 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Wafter-thin gem to help control rogue test/unit/autorun requires
|
15
15
|
email: cukes@googlegroups.com
|
@@ -17,13 +17,15 @@ executables: []
|
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
19
|
files:
|
20
|
-
- .travis.yml
|
20
|
+
- ".travis.yml"
|
21
21
|
- History.md
|
22
22
|
- LICENSE
|
23
23
|
- Makefile
|
24
24
|
- README.md
|
25
25
|
- Rakefile
|
26
26
|
- lib/multi_test.rb
|
27
|
+
- lib/multi_test/assertion_library.rb
|
28
|
+
- lib/multi_test/minitest_world.rb
|
27
29
|
- multi_test.gemspec
|
28
30
|
- test/README.md
|
29
31
|
- test/all
|
@@ -45,6 +47,15 @@ files:
|
|
45
47
|
- test/gemfiles/plain-ruby/Gemfile
|
46
48
|
- test/gemfiles/plain-ruby/Gemfile.lock
|
47
49
|
- test/gemfiles/plain-ruby/scenarios
|
50
|
+
- test/gemfiles/rspec-1.3.2/Gemfile
|
51
|
+
- test/gemfiles/rspec-1.3.2/Gemfile.lock
|
52
|
+
- test/gemfiles/rspec-1.3.2/scenarios
|
53
|
+
- test/gemfiles/rspec-2.14/Gemfile
|
54
|
+
- test/gemfiles/rspec-2.14/Gemfile.lock
|
55
|
+
- test/gemfiles/rspec-2.14/scenarios
|
56
|
+
- test/gemfiles/rspec-3.0/Gemfile
|
57
|
+
- test/gemfiles/rspec-3.0/Gemfile.lock
|
58
|
+
- test/gemfiles/rspec-3.0/scenarios
|
48
59
|
- test/gemfiles/test-unit-2.4.8/Gemfile
|
49
60
|
- test/gemfiles/test-unit-2.4.8/Gemfile.lock
|
50
61
|
- test/gemfiles/test-unit-2.4.8/scenarios
|
@@ -53,34 +64,38 @@ files:
|
|
53
64
|
- test/gemfiles/test-unit-2.4.9/scenarios
|
54
65
|
- test/run
|
55
66
|
- test/scenarios/bundler_require.rb
|
67
|
+
- test/scenarios/minitest_assertions.rb
|
56
68
|
- test/scenarios/minitest_propagate_exit_code.rb
|
57
69
|
- test/scenarios/require_activesupport_testing_autorun.rb
|
58
70
|
- test/scenarios/require_test_unit.rb
|
71
|
+
- test/scenarios/rspec_matchers.rb
|
72
|
+
- test/scenarios/spec_matchers.rb
|
73
|
+
- test/scenarios/test_unit_assertions.rb
|
59
74
|
homepage: http://cukes.info
|
60
75
|
licenses:
|
61
76
|
- MIT
|
62
77
|
metadata: {}
|
63
78
|
post_install_message:
|
64
79
|
rdoc_options:
|
65
|
-
- --charset=UTF-8
|
80
|
+
- "--charset=UTF-8"
|
66
81
|
require_paths:
|
67
82
|
- lib
|
68
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
84
|
requirements:
|
70
|
-
- -
|
85
|
+
- - ">="
|
71
86
|
- !ruby/object:Gem::Version
|
72
87
|
version: '0'
|
73
88
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
89
|
requirements:
|
75
|
-
- -
|
90
|
+
- - ">="
|
76
91
|
- !ruby/object:Gem::Version
|
77
92
|
version: '0'
|
78
93
|
requirements: []
|
79
94
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
95
|
+
rubygems_version: 2.2.0
|
81
96
|
signing_key:
|
82
97
|
specification_version: 4
|
83
|
-
summary: multi-test-0.0
|
98
|
+
summary: multi-test-0.1.0
|
84
99
|
test_files:
|
85
100
|
- test/README.md
|
86
101
|
- test/all
|
@@ -102,6 +117,15 @@ test_files:
|
|
102
117
|
- test/gemfiles/plain-ruby/Gemfile
|
103
118
|
- test/gemfiles/plain-ruby/Gemfile.lock
|
104
119
|
- test/gemfiles/plain-ruby/scenarios
|
120
|
+
- test/gemfiles/rspec-1.3.2/Gemfile
|
121
|
+
- test/gemfiles/rspec-1.3.2/Gemfile.lock
|
122
|
+
- test/gemfiles/rspec-1.3.2/scenarios
|
123
|
+
- test/gemfiles/rspec-2.14/Gemfile
|
124
|
+
- test/gemfiles/rspec-2.14/Gemfile.lock
|
125
|
+
- test/gemfiles/rspec-2.14/scenarios
|
126
|
+
- test/gemfiles/rspec-3.0/Gemfile
|
127
|
+
- test/gemfiles/rspec-3.0/Gemfile.lock
|
128
|
+
- test/gemfiles/rspec-3.0/scenarios
|
105
129
|
- test/gemfiles/test-unit-2.4.8/Gemfile
|
106
130
|
- test/gemfiles/test-unit-2.4.8/Gemfile.lock
|
107
131
|
- test/gemfiles/test-unit-2.4.8/scenarios
|
@@ -110,7 +134,11 @@ test_files:
|
|
110
134
|
- test/gemfiles/test-unit-2.4.9/scenarios
|
111
135
|
- test/run
|
112
136
|
- test/scenarios/bundler_require.rb
|
137
|
+
- test/scenarios/minitest_assertions.rb
|
113
138
|
- test/scenarios/minitest_propagate_exit_code.rb
|
114
139
|
- test/scenarios/require_activesupport_testing_autorun.rb
|
115
140
|
- test/scenarios/require_test_unit.rb
|
141
|
+
- test/scenarios/rspec_matchers.rb
|
142
|
+
- test/scenarios/spec_matchers.rb
|
143
|
+
- test/scenarios/test_unit_assertions.rb
|
116
144
|
has_rdoc:
|