test_launcher 2.11.0 → 2.12.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b3ce6982ef89dc1b00a8c17bbf8f0219d616143
|
4
|
+
data.tar.gz: eec643d857980c326cc97131d6f1254efec845a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5cf6705fc601e32a06bef58a25f7cb075f1f8545e1b800889fe4982017c4c40241c752a9ff6751adcbc3135fe696eef9b47d7fe393dfd94968842dc15a16cdfd
|
7
|
+
data.tar.gz: d1390c4599b34ee589afc80b54b3e64082d8fca0aa6e1d9568926e31e3c08ddffc0b94f75d22d6ee2ffeeac6791e41dff70ac0d9ee0283e5ef3619f62770a848
|
data/README.md
CHANGED
@@ -344,10 +344,22 @@ Replace it with:
|
|
344
344
|
|
345
345
|
1. Run a test. Test Launcher should report that it is hijacking the test and it will output the command that it has decided to use.
|
346
346
|
|
347
|
+
|
347
348
|
### Debugging Support
|
348
349
|
|
349
350
|
Using Test Launcher to hijack your RubyMine run configuration should allow you to debug any test as well without issue.
|
350
351
|
|
352
|
+
|
353
|
+
### Spring and Rubymine
|
354
|
+
|
355
|
+
If you don't want to use spring to run your tests, but test_launcher tries to use it anyways, follow these steps:
|
356
|
+
|
357
|
+
1. Open your project
|
358
|
+
1. Click on Run -> 'Edit Configurations...'
|
359
|
+
1. If you have any run configurations listed under 'Test::Unit/Shoulda/Minitest', use the minus button to remove them.
|
360
|
+
1. Open the 'Defaults' and click on 'Test::Unit/Shoulda/Minitest'
|
361
|
+
1. Under 'Environment Variables' add as a variable with the name `DISABLE_SPRING` and the value `1`
|
362
|
+
|
351
363
|
# Visual Studio Code Support
|
352
364
|
|
353
365
|
To run tests from the editor, we need to define some tasks. I like to have three tasks defined: run the test that contains the cursor, run the whole test file, and rerun the last test.
|
@@ -107,7 +107,11 @@ Open an issue on https://github.com/petekinnecom/test_launcher if this is someth
|
|
107
107
|
"/#{name}/"
|
108
108
|
end
|
109
109
|
|
110
|
-
|
110
|
+
if test_case.spring_enabled?
|
111
|
+
%{cd #{test_case.app_root} && TESTOPTS="--name='#{name_arg}'" #{test_case.example_runner} #{test_case.file}}
|
112
|
+
else
|
113
|
+
%{cd #{test_case.app_root} && #{test_case.example_runner} #{test_case.file} --name='#{name_arg}'}
|
114
|
+
end
|
111
115
|
end
|
112
116
|
|
113
117
|
def multiple_examples_same_file(test_cases)
|
@@ -127,7 +131,7 @@ Open an issue on https://github.com/petekinnecom/test_launcher if this is someth
|
|
127
131
|
class TestCase < Base::TestCase
|
128
132
|
def example_runner
|
129
133
|
if spring_enabled?
|
130
|
-
"bundle exec spring
|
134
|
+
"bundle exec spring rake test"
|
131
135
|
else
|
132
136
|
"bundle exec ruby -I test"
|
133
137
|
end
|
@@ -135,7 +139,7 @@ Open an issue on https://github.com/petekinnecom/test_launcher if this is someth
|
|
135
139
|
|
136
140
|
def file_runner
|
137
141
|
if spring_enabled?
|
138
|
-
"bundle exec spring
|
142
|
+
"bundle exec spring rake test"
|
139
143
|
else
|
140
144
|
"bundle exec ruby -I test -e 'ARGV.each {|f| require(f)}'"
|
141
145
|
end
|
@@ -16,7 +16,8 @@ module TestLauncher
|
|
16
16
|
example: "example_name",
|
17
17
|
app_root: "app_root",
|
18
18
|
example_runner: "example_runner",
|
19
|
-
file: "file"
|
19
|
+
file: "file",
|
20
|
+
spring_enabled?: false
|
20
21
|
)
|
21
22
|
assert_equal "cd app_root && example_runner file --name='/example_name/'", Runner.new.single_example(test_case)
|
22
23
|
end
|
@@ -27,7 +28,8 @@ module TestLauncher
|
|
27
28
|
example: "example_name",
|
28
29
|
app_root: "app_root",
|
29
30
|
example_runner: "example_runner",
|
30
|
-
file: "file"
|
31
|
+
file: "file",
|
32
|
+
spring_enabled?: false
|
31
33
|
),
|
32
34
|
MockTestCase.new(
|
33
35
|
example: "example_name",
|
@@ -270,7 +270,7 @@ module TestLauncher
|
|
270
270
|
end
|
271
271
|
|
272
272
|
launch("class_1_test.rb", env: {}, searcher: searcher)
|
273
|
-
assert_equal "cd /src && bundle exec spring
|
273
|
+
assert_equal "cd /src && bundle exec spring rake test /src/test/class_1_test.rb", shell_mock.recall_exec
|
274
274
|
|
275
275
|
launch("class_1_test.rb", env: {"DISABLE_SPRING" => "1"}, searcher: searcher)
|
276
276
|
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
|
@@ -290,7 +290,7 @@ module TestLauncher
|
|
290
290
|
end
|
291
291
|
|
292
292
|
launch("class_1_test.rb --spring", env: {}, searcher: searcher)
|
293
|
-
assert_equal "cd /src && bundle exec spring
|
293
|
+
assert_equal "cd /src && bundle exec spring rake test /src/test/class_1_test.rb", shell_mock.recall_exec
|
294
294
|
end
|
295
295
|
|
296
296
|
def test__by_regex__one_match
|
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.12.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: 2018-
|
11
|
+
date: 2018-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|