test_launcher 2.7.1 → 2.8.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ca1522e464295b8408cdd7b3845a8d07103075f
4
- data.tar.gz: 98e0331b3ad4ff8a7a0179ac1990019b4b74069d
3
+ metadata.gz: 07d9267a3d99c79915afc72d3d3f248187c3a340
4
+ data.tar.gz: abee8b1f87c40d60490370f1f4061842d450d2b1
5
5
  SHA512:
6
- metadata.gz: 9e331a1fedd1496eae9a785f007a999698c8ff8ae0fd20cd7034cba5f794aa7fd4e526ee1452e05aa2fea1e2a704be51aca34460e4b250a8a08c82e9582983ed
7
- data.tar.gz: ab4c656b2d2fc9e86a596861f3db4264a15f5f39deaef763849230834cc8547e2e2930063524c0883611789d8263cc8c117dffa03ed74830a3f0220961087188
6
+ metadata.gz: 5b8eba152d977234ab02d8ed5503ef71fcdeb44c7b2da2ea73ca4740e9d25eba824f5e1493a907dd1c59fd15ed36afab0a8b0328e84505d1c57b727b21a535cc
7
+ data.tar.gz: 74652e9d1e9f799bd8e5b85a13eaeb1af3ed229dfbf0f26d50dfebfcc0b4444ebb38332d0c84c2bc5e4c0d81861b8c6f10a8cbf091bb94b84f2ee1c85efed591
@@ -32,7 +32,7 @@ module TestLauncher
32
32
  while !candidates.empty?
33
33
  if candidates.last == test_root_dir_name
34
34
  root_path = File.join("/", candidates[0..-2])
35
- return root_path if Dir.entries(root_path).any? {|e| e.match /Gemfile|gemspec|mix.exs/} # TODO: extract this
35
+ return root_path if Dir.entries(root_path).any? {|e| e.match /Gemfile|gemspec|mix.exs|config.ru/} # TODO: extract this
36
36
  end
37
37
 
38
38
  candidates.pop
@@ -1,3 +1,3 @@
1
1
  module TestLauncher
2
- VERSION = "2.7.1"
2
+ VERSION = "2.8.0"
3
3
  end
@@ -40,6 +40,16 @@ module TestLauncher
40
40
  assert_equal "/path/root", test_case.app_root
41
41
  end
42
42
 
43
+ def test_app_root__multiple_test_dirs__find_configru
44
+ test_case = DummyTestCase.new(file: "/path/root/test/dummy/test/thing_test.rb")
45
+
46
+ Dir.stubs(:entries).with("/path/root").returns([".", "..", "gem.gemspec", "other_stuff.rb"])
47
+ Dir.stubs(:entries).with("/path/root/test").returns([".", "..", "other_stuff.rb"])
48
+ Dir.stubs(:entries).with("/path/root/test/dummy").returns([".", "..", "config.ru"])
49
+
50
+ assert_equal "/path/root/test/dummy", test_case.app_root
51
+ end
52
+
43
53
  def test_app_root__multiple_test_dirs__prefers_deeply_nested_dirs
44
54
  test_case = DummyTestCase.new(file: "/path/root/test/inline_gem/test/thing_test.rb")
45
55
 
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.7.1
4
+ version: 2.8.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-07-09 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler