guard-test 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,8 +1,14 @@
1
+ ## 0.7.0 - November 6, 2012
2
+
3
+ ### New feature:
4
+
5
+ - [#35][]: Support `include:` option to extend the load path of the test runner. ([@amiel][])
6
+
1
7
  ## 0.6.0 - November 3, 2012
2
8
 
3
9
  ### New feature:
4
10
 
5
- - [#34][]: Support for *_tests.rb ([@pastorius][])
11
+ - [#34][]: Support for `*_tests.rb`. ([@pastorius][])
6
12
 
7
13
  ## 0.5.0 - June 2, 2012
8
14
 
@@ -138,7 +144,9 @@
138
144
  [#21]: https://github.com/guard/guard/issues/21
139
145
  [#24]: https://github.com/guard/guard/issues/24
140
146
  [#34]: https://github.com/guard/guard/issues/34
147
+ [#35]: https://github.com/guard/guard/issues/35
141
148
  [@Ask11]: https://github.com/Ask11
149
+ [@amiel]: https://github.com/amiel
142
150
  [@carlost]: https://github.com/carlost
143
151
  [@coderjoe]: https://github.com/coderjoe
144
152
  [@dasch]: https://github.com/dasch
data/README.md CHANGED
@@ -87,6 +87,7 @@ Please read the [Guard documentation](https://github.com/guard/guard#readme) for
87
87
  * `rubygems` (`Boolean`) - Whether or not to require rubygems (if bundler isn't used) when running the tests. Default to `false`.
88
88
  * `rvm` (`Array<String>`) - Directly run your specs against multiple Rubies. Default to `nil`.
89
89
  * `drb` (`Boolean`) - Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit). Default to `false`.
90
+ * `include` (`Array<String>`) - Pass arbitrary include paths to the command that runs the tests. Default to `['test']`.
90
91
  * `cli` (`String`) - Pass arbitrary CLI arguments to the command that runs the tests. Default to `nil`.
91
92
  * `all_on_start` (`Boolean`) - Run all tests on Guard startup. Default to `true`.
92
93
  * `all_after_pass` (`Boolean`) - Run all tests after the current run tests pass. Default to `true`.
@@ -9,8 +9,9 @@ module Guard
9
9
  :bundler => File.exist?("#{Dir.pwd}/Gemfile"),
10
10
  :rubygems => false,
11
11
  :rvm => [],
12
+ :include => ['test'],
12
13
  :drb => false,
13
- :cli => ""
14
+ :cli => ''
14
15
  }.merge(options)
15
16
  end
16
17
 
@@ -40,7 +41,7 @@ module Guard
40
41
  require 'spork-testunit'
41
42
  rescue LoadError
42
43
  end
43
- ::Guard::UI.info("Using testdrb to run the tests") if @drb
44
+ ::Guard::UI.info('Using testdrb to run the tests') if @drb
44
45
  end
45
46
  @drb
46
47
  end
@@ -50,16 +51,16 @@ module Guard
50
51
  def test_unit_command(paths)
51
52
  cmd_parts = []
52
53
  cmd_parts << "rvm #{@options[:rvm].join(',')} exec" unless @options[:rvm].empty?
53
- cmd_parts << "bundle exec" if bundler?
54
+ cmd_parts << 'bundle exec' if bundler?
54
55
  cmd_parts << case true
55
56
  when drb?
56
- "testdrb"
57
+ 'testdrb'
57
58
  else
58
- "ruby"
59
+ 'ruby'
59
60
  end
60
- cmd_parts << "-Itest"
61
- cmd_parts << "-r bundler/setup" if bundler?
62
- cmd_parts << "-rubygems" if rubygems?
61
+ cmd_parts << Array(@options[:include]).map { |path| "-I#{path}" }
62
+ cmd_parts << '-r bundler/setup' if bundler?
63
+ cmd_parts << '-rubygems' if rubygems?
63
64
 
64
65
  unless drb?
65
66
  cmd_parts << "-r #{File.expand_path("../guard_test_runner", __FILE__)}"
@@ -69,8 +70,8 @@ module Guard
69
70
  paths.each { |path| cmd_parts << "\"./#{path}\"" }
70
71
 
71
72
  unless drb?
72
- cmd_parts << "--use-color"
73
- cmd_parts << "--runner=guard"
73
+ cmd_parts << '--use-color'
74
+ cmd_parts << '--runner=guard'
74
75
  end
75
76
 
76
77
  cmd_parts << @options[:cli]
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  module Guard
3
3
  module TestVersion
4
- VERSION = '0.6.0'
4
+ VERSION = '0.7.0'
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-03 00:00:00.000000000 Z
12
+ date: 2012-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: guard
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  segments:
114
114
  - 0
115
- hash: 819500394111635453
115
+ hash: -2081366749670452431
116
116
  required_rubygems_version: !ruby/object:Gem::Requirement
117
117
  none: false
118
118
  requirements: