test_launcher 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +8 -1
- data/lib/test_launcher/frameworks/implementation/test_case.rb +13 -0
- data/lib/test_launcher/version.rb +1 -1
- 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: ab1010406bbd20148694b51995b73b183d05c6e0
|
4
|
+
data.tar.gz: d46b2f16b1ca1c0a73acafb7a20293569e807788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 747cf2f747cff578ada42e051d174a2f59a1dfe330fa274ec00d286bbb3c786106381336ccbaa99e79f4fe619e40b0115030d995de8429eec8f76cb49037de7a
|
7
|
+
data.tar.gz: bfe7e480ac1839ad59ac4b0035831dc7a0503220e0b221eed670b5a80992f9d92c37f80f987f242d25139f0a77e7a1de11c1f8676947d9af11e4fe4f60c23ed3
|
data/README.md
CHANGED
@@ -57,7 +57,6 @@ But can it run two files for you?
|
|
57
57
|
```
|
58
58
|
test_launcher blog_post_test.rb comment_test.rb
|
59
59
|
|
60
|
-
#=> ruby -I test test/models/blog_post_test.rb --name=test_blog_name_thing
|
61
60
|
#=> ruby -I test -e 'ARGV.each {|f| require(f)}' test/models/blog_post_test.rb test/models/comment_test.rb
|
62
61
|
```
|
63
62
|
|
@@ -85,6 +84,14 @@ test_launcher springified_test
|
|
85
84
|
|
86
85
|
Test Launcher will not use spring if the `DISABLE_SPRING=1` environment variable is set.
|
87
86
|
|
87
|
+
### Running all tests you've changed:
|
88
|
+
|
89
|
+
This will find all `*_test.rb` files in your status and pass them to test_launcher to be run. Use this before you commit so you don't accidentally commit a test you've broken.
|
90
|
+
|
91
|
+
```
|
92
|
+
git status | grep -Eo "([A-z\/]+_test.rb)" | xargs test_launcher
|
93
|
+
```
|
94
|
+
|
88
95
|
#Installation
|
89
96
|
|
90
97
|
To install:
|
@@ -24,6 +24,19 @@ module TestLauncher
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def app_root
|
27
|
+
# TODO: untested - If we have more than one /test/ folder in the path, we search for a Gemfile or gemspec
|
28
|
+
if exploded_path.select { test_root_folder_name }.size > 1
|
29
|
+
exploded_path.each_with_index do |folder_name, i|
|
30
|
+
next unless folder_name == test_root_folder_name
|
31
|
+
|
32
|
+
root_path = File.join("/", exploded_path[0...i])
|
33
|
+
if Dir.entries(root_path).any? {|e| e.match /Gemfile|gemspec/}
|
34
|
+
return root_path
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
# default to our best guess
|
27
40
|
path = exploded_path[0...exploded_path.rindex(test_root_folder_name)]
|
28
41
|
File.join("/", path)
|
29
42
|
end
|
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: 1.
|
4
|
+
version: 1.4.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: 2016-10-
|
11
|
+
date: 2016-10-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|