testrbl 0.3.3 → 0.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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 41a0a564e6fb32781e157e6054f8ced8a8cd81b6
4
+ data.tar.gz: 20355d7b0121eb81dc3d80ce8233878e82b1c193
5
+ SHA512:
6
+ metadata.gz: f8c535e9683cd16d763995592eb5be7bbde3dafb5814688edc859c972af2226201f2b842b64c9b389e485f7db0c138cfbcb163dd9af85ac84b61272eb55525a2
7
+ data.tar.gz: 54681b33555f19fa186982de10f3495ebc53534ead9366701fa1921fd0bfccef23cb6571731c5a87d8411ba0c6e2e51259c11bc4d7913e66e5162cefe4cebebc
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- testrbl (0.3.3)
4
+ testrbl (0.4.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -23,7 +23,8 @@ module Testrbl
23
23
  else
24
24
  if files.size == 1 and File.file?(files.first)
25
25
  run(ruby + load_options + files + options)
26
- elsif files.all? { |f| File.file?(f) } and options.none? { |arg| arg =~ /^-n/ }
26
+ elsif options.none? { |arg| arg =~ /^-n/ }
27
+ files = files.map { |f| File.directory?(f) ? all_test_files_in(f) : f }.flatten
27
28
  run(ruby + load_options + files.map { |f| "-r#{f}" } + options + ["-e", ""])
28
29
  else # pass though
29
30
  # no bundle exec: projects with mini and unit-test do not run well via bundle exec testrb
@@ -57,6 +58,10 @@ module Testrbl
57
58
 
58
59
  private
59
60
 
61
+ def self.all_test_files_in(folder)
62
+ Dir[File.join(folder, "{**/,}*_{test,spec}.rb")]
63
+ end
64
+
60
65
  def self.partition_options(options)
61
66
  next_is_before = false
62
67
  options.partition do |option|
@@ -1,3 +1,3 @@
1
1
  module Testrbl
2
- VERSION = '0.3.3'
2
+ VERSION = '0.4.0'
3
3
  end
@@ -346,6 +346,11 @@ describe Testrbl do
346
346
 
347
347
  context "multiple files / folders" do
348
348
  before do
349
+ write "Gemfile", <<-RUBY
350
+ source "https://rubygems.org"
351
+ gem "test-unit"
352
+ RUBY
353
+
349
354
  write "a_test.rb", <<-RUBY
350
355
  require 'test/unit'
351
356
 
@@ -432,7 +437,7 @@ describe Testrbl do
432
437
  end
433
438
 
434
439
  it "runs via testrb if unavoidable" do
435
- result = testrbl "a/b/c_test.rb backtrace_test.rb -n '/xxx/'"
440
+ result = Bundler.with_clean_env { testrbl "a/b/c_test.rb backtrace_test.rb -n '/xxx/'" }
436
441
  result.should include("CDE")
437
442
  result.should include("BACKTRACE")
438
443
  result.should include("bin/testrb:")
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: testrbl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
5
- prerelease:
4
+ version: 0.4.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Michael Grosser
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2014-01-04 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description:
15
14
  email: michael@grosser.it
@@ -32,32 +31,25 @@ files:
32
31
  homepage: http://github.com/grosser/testrbl
33
32
  licenses:
34
33
  - MIT
34
+ metadata: {}
35
35
  post_install_message:
36
36
  rdoc_options: []
37
37
  require_paths:
38
38
  - lib
39
39
  required_ruby_version: !ruby/object:Gem::Requirement
40
- none: false
41
40
  requirements:
42
- - - ! '>='
41
+ - - '>='
43
42
  - !ruby/object:Gem::Version
44
43
  version: '0'
45
- segments:
46
- - 0
47
- hash: -949188406167445610
48
44
  required_rubygems_version: !ruby/object:Gem::Requirement
49
- none: false
50
45
  requirements:
51
- - - ! '>='
46
+ - - '>='
52
47
  - !ruby/object:Gem::Version
53
48
  version: '0'
54
- segments:
55
- - 0
56
- hash: -949188406167445610
57
49
  requirements: []
58
50
  rubyforge_project:
59
- rubygems_version: 1.8.25
51
+ rubygems_version: 2.0.14
60
52
  signing_key:
61
- specification_version: 3
53
+ specification_version: 4
62
54
  summary: Run ruby Test::Unit/Shoulda tests by line-number / folder / the dozen
63
55
  test_files: []