test_launcher 2.10.0 → 2.11.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: da8cb4f051860842d29afa313d9abecb88b8a92f
4
- data.tar.gz: 92425cda5894cc6ac4c0a5819f6d8e62d2aad695
3
+ metadata.gz: 2b6344578d2ed599b65e2eab88fd2100dd1978c9
4
+ data.tar.gz: d621e3a27394e509207e418e38a568c116a86072
5
5
  SHA512:
6
- metadata.gz: d2d49ee5824b74a1934527854e953a46362db53fc6b15d0c1366a27886f74d3a167a1f02981e4d9a503ff08b99aa7b61d33c90a6c8378c323f5ef4b105123f40
7
- data.tar.gz: b148dfc41efbe867659d62e5dc9430190fb22b3cf69c8060cf066c6242b7306055ddbba988d84780e222cdf053d6af79ec7a75947b44f817b8377675f5615c56
6
+ metadata.gz: c8ae9955118c4a8a452631bb44e55e8c23295d36c4aa1bf131fc93f27da20c09f475f057482fff095b8556d19e8991dfbbe365dd4c4ca6486d4800f127556a7f
7
+ data.tar.gz: db1b9c19e705c549d7f30ed36760a49c26126d64322033ee156348ee1a4cad8516c27a1ca62655dc2d73fa90b8270abfc4911ff12651903056ac277e0ab65c5f
data/README.md CHANGED
@@ -164,9 +164,13 @@ Test Launcher will not use spring if the `DISABLE_SPRING=1` environment variable
164
164
  # Usage and Options
165
165
 
166
166
  ```
167
- Common Usage: `test_launcher "search string" [--all]`
167
+ Find tests and run them by trying to match an individual test or the name of a test file(s).
168
168
 
169
- VERSION: 2.2.0
169
+ See full README: https://github.com/petekinnecom/test_launcher
170
+
171
+ Usage: `test_launcher "search string" [--all]`
172
+
173
+ VERSION: 2.10.0
170
174
 
171
175
  -a, --all Run all matching tests. Defaults to false.
172
176
  -h, --help Prints this help
@@ -176,6 +180,7 @@ VERSION: 2.2.0
176
180
  --example example alias of name
177
181
  -r, --rerun Rerun the previous test. This flag cannot be set when entering search terms
178
182
  --disable-spring Disable spring. You can also set the env var: DISABLE_SPRING=1
183
+ --spring Force spring commands to be used (useful when test_launcher is unable to detect that spring is used)
179
184
  ```
180
185
 
181
186
  # Search Priority
@@ -8,6 +8,10 @@ module TestLauncher
8
8
  def disable_spring?
9
9
  @disable_spring
10
10
  end
11
+
12
+ def force_spring?
13
+ false
14
+ end
11
15
  end
12
16
  end
13
17
  end
@@ -1,3 +1,3 @@
1
1
  module TestLauncher
2
- VERSION = "2.10.0"
2
+ VERSION = "2.11.0"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require "test_helper"
2
2
  require "test_launcher/rubymine/launcher"
3
+ require "test_launcher/rubymine/request"
3
4
 
4
5
  module TestLauncher
5
6
  class RubymineTest < TestCase
@@ -10,13 +11,27 @@ module TestLauncher
10
11
  assert_executes expected_command, args
11
12
  end
12
13
 
13
- def test_launch__run__example
14
+ def test_launch__run__example__spring
14
15
  args = "/Users/username/some_app/bin/spring testunit /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name=some_test_name"
15
16
  expected_command = "cd /Users/username/some_app/engines/some_engine && bundle exec ruby -I test /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name='some_test_name'"
16
17
 
17
18
  assert_executes expected_command, args
18
19
  end
19
20
 
21
+ def test_launch__run__example__no_spring
22
+ args = "/Users/username/some_app/engines/some_engine/test/does_something_test.rb --name=some_test_name"
23
+ expected_command = "cd /Users/username/some_app/engines/some_engine && bundle exec ruby -I test /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name='some_test_name'"
24
+
25
+ assert_executes expected_command, args
26
+ end
27
+
28
+ def test_launch__run__example__no_spring__no_disable_spring
29
+ args = "/Users/username/some_app/engines/some_engine/test/does_something_test.rb --name=some_test_name"
30
+ expected_command = "cd /Users/username/some_app/engines/some_engine && bundle exec ruby -I test /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name='some_test_name'"
31
+
32
+ assert_executes expected_command, args, disable_spring: false
33
+ end
34
+
20
35
  def test_launch__debug__example
21
36
  args = "/Users/username/.rvm/gems/ruby-2.2.3/gems/ruby-debug-ide-0.6.1.beta2/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 58930 --host 0.0.0.0 --dispatcher-port 58931 -- /Users/username/some_app/bin/spring testunit /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name=some_test_name"
22
37
  expected_command = "cd /Users/username/some_app/engines/some_engine && ruby -I test /Users/username/.rvm/gems/ruby-2.2.3/gems/ruby-debug-ide-0.6.1.beta2/bin/rdebug-ide --disable-int-handler --evaluation-timeout 10 --rubymine-protocol-extensions --port 58930 --host 0.0.0.0 --dispatcher-port 58931 -- /Users/username/some_app/bin/spring testunit /Users/username/some_app/engines/some_engine/test/does_something_test.rb --name=some_test_name"
@@ -33,13 +48,13 @@ module TestLauncher
33
48
 
34
49
  private
35
50
 
36
- def assert_executes(expected_command, args)
37
- dummy_request = mock { stubs(:disable_spring?).returns(true) }
51
+ def assert_executes(expected_command, args, disable_spring: true)
52
+ request = Rubymine::Request.new(disable_spring: disable_spring)
38
53
 
39
54
  launcher = Rubymine::Launcher.new(
40
55
  args: args.split(" "),
41
56
  shell: dummy_shell,
42
- request: dummy_request
57
+ request: request
43
58
  )
44
59
 
45
60
  launcher.launch
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.10.0
4
+ version: 2.11.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-12-04 00:00:00.000000000 Z
11
+ date: 2018-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler