test_launcher 2.9.0 → 2.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/test_launcher/cli.rb +1 -0
- data/lib/test_launcher/cli/input_parser.rb +15 -0
- data/lib/test_launcher/cli/options.rb +1 -0
- data/lib/test_launcher/cli/request.rb +6 -0
- data/lib/test_launcher/frameworks/minitest.rb +1 -0
- data/lib/test_launcher/version.rb +1 -1
- data/test/test_launcher/minitest_integration_test.rb +14 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: da8cb4f051860842d29afa313d9abecb88b8a92f
|
4
|
+
data.tar.gz: 92425cda5894cc6ac4c0a5819f6d8e62d2aad695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d2d49ee5824b74a1934527854e953a46362db53fc6b15d0c1366a27886f74d3a167a1f02981e4d9a503ff08b99aa7b61d33c90a6c8378c323f5ef4b105123f40
|
7
|
+
data.tar.gz: b148dfc41efbe867659d62e5dc9430190fb22b3cf69c8060cf066c6242b7306055ddbba988d84780e222cdf053d6af79ec7a75947b44f817b8377675f5615c56
|
data/lib/test_launcher/cli.rb
CHANGED
@@ -29,6 +29,7 @@ module TestLauncher
|
|
29
29
|
rerun: cli_options.rerun,
|
30
30
|
run_all: cli_options.run_all,
|
31
31
|
disable_spring: cli_options.disable_spring,
|
32
|
+
force_spring: cli_options.force_spring,
|
32
33
|
example_name: cli_options.example_name,
|
33
34
|
shell: cli_options.shell,
|
34
35
|
searcher: cli_options.searcher,
|
@@ -68,6 +68,7 @@ VERSION: #{TestLauncher::VERSION}
|
|
68
68
|
run_all: !!@options[:run_all],
|
69
69
|
rerun: !!@options[:rerun],
|
70
70
|
disable_spring: @options[:disable_spring] || !!@env["DISABLE_SPRING"],
|
71
|
+
force_spring: @options[:force_spring],
|
71
72
|
example_name: @options[:name],
|
72
73
|
frameworks: frameworks,
|
73
74
|
shell: shell,
|
@@ -116,8 +117,22 @@ VERSION: #{TestLauncher::VERSION}
|
|
116
117
|
end
|
117
118
|
|
118
119
|
opts.on("--disable-spring", "Disable spring. You can also set the env var: DISABLE_SPRING=1") do
|
120
|
+
if options[:force_spring]
|
121
|
+
puts "You have specified both --spring and --disable-spring. Please specify only one."
|
122
|
+
exit(1)
|
123
|
+
end
|
124
|
+
|
119
125
|
options[:disable_spring] = true
|
120
126
|
end
|
127
|
+
|
128
|
+
opts.on("--spring", "Force spring commands to be used (useful when test_launcher is unable to detect that spring is used)") do
|
129
|
+
if options[:disable_spring]
|
130
|
+
puts "You have specified both --spring and --disable-spring. Please specify only one."
|
131
|
+
exit(1)
|
132
|
+
end
|
133
|
+
|
134
|
+
options[:force_spring] = true
|
135
|
+
end
|
121
136
|
end
|
122
137
|
end
|
123
138
|
end
|
@@ -7,6 +7,7 @@ module TestLauncher
|
|
7
7
|
rerun: false,
|
8
8
|
run_all: false,
|
9
9
|
disable_spring: false,
|
10
|
+
force_spring: false,
|
10
11
|
example_name: nil,
|
11
12
|
shell:,
|
12
13
|
searcher:
|
@@ -16,6 +17,7 @@ module TestLauncher
|
|
16
17
|
@rerun = rerun
|
17
18
|
@run_all = run_all
|
18
19
|
@disable_spring = disable_spring
|
20
|
+
@force_spring = force_spring
|
19
21
|
@example_name = example_name
|
20
22
|
@shell = shell
|
21
23
|
@searcher = searcher
|
@@ -37,6 +39,10 @@ module TestLauncher
|
|
37
39
|
@disable_spring
|
38
40
|
end
|
39
41
|
|
42
|
+
def force_spring?
|
43
|
+
@force_spring
|
44
|
+
end
|
45
|
+
|
40
46
|
def example_name
|
41
47
|
@example_name
|
42
48
|
end
|
@@ -279,6 +279,20 @@ module TestLauncher
|
|
279
279
|
assert_equal "cd /src && bundle exec ruby -I test -e 'ARGV.each {|f| require(f)}' /src/test/class_1_test.rb", shell_mock.recall_exec
|
280
280
|
end
|
281
281
|
|
282
|
+
def test_uses_spring__if_forced
|
283
|
+
searcher = MemorySearcher.new do |searcher|
|
284
|
+
searcher.mock_file do |f|
|
285
|
+
f.path "/src/test/class_1_test.rb"
|
286
|
+
f.contents <<-RB
|
287
|
+
def test_name
|
288
|
+
RB
|
289
|
+
end
|
290
|
+
end
|
291
|
+
|
292
|
+
launch("class_1_test.rb --spring", env: {}, searcher: searcher)
|
293
|
+
assert_equal "cd /src && bundle exec spring testunit /src/test/class_1_test.rb", shell_mock.recall_exec
|
294
|
+
end
|
295
|
+
|
282
296
|
def test__by_regex__one_match
|
283
297
|
searcher = MemorySearcher.new do |searcher|
|
284
298
|
searcher.mock_file do |f|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Kinnecom
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|