guard-test 0.8.0 → 1.0.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.
@@ -1,115 +1,129 @@
1
+ ## git master
2
+
3
+ Nothing here.
4
+
5
+ ## 1.0.0 - May 8, 2013
6
+
7
+ ### New feature
8
+
9
+ - [#40][] & [#41][]: Add support for running tests via `spring`. ([@pgaertig][])
10
+
11
+ ### Improvements
12
+
13
+ * Get rid of `autoload`. ([@rymai][])
14
+
1
15
  ## 0.8.0 - March 24, 2013
2
16
 
3
- ### New feature:
17
+ ### New feature
4
18
 
5
19
  - [#38][]: Add support for running tests via `zeus`. ([@djmaze][])
6
20
 
7
21
  ## 0.7.0 - November 6, 2012
8
22
 
9
- ### New feature:
23
+ ### New feature
10
24
 
11
25
  - [#35][]: Support `include:` option to extend the load path of the test runner. ([@amiel][])
12
26
 
13
27
  ## 0.6.0 - November 3, 2012
14
28
 
15
- ### New feature:
29
+ ### New feature
16
30
 
17
31
  - [#34][]: Support for `*_tests.rb`. ([@pastorius][])
18
32
 
19
33
  ## 0.5.0 - June 2, 2012
20
34
 
21
- ### Bug fix:
35
+ ### Bug fix
22
36
 
23
37
  - [#24][]: Add note for Rails projects using profile/benchmark tests in README. ([@coderjoe][])
24
38
 
25
- ### Changes:
39
+ ### Changes
26
40
 
27
- - Updated for Guard 1.1. ([@rymai][])
41
+ - Updat for Guard 1.1. ([@rymai][])
28
42
 
29
- ### New feature:
43
+ ### New feature
30
44
 
31
45
  - [#20][]: Add the `:rubygems` options for projects that don't use Bundler. ([@rymai][])
32
46
 
33
47
  ## 0.4.3 - December 19, 2011
34
48
 
35
- ### Bug fix:
49
+ ### Bug fix
36
50
 
37
- - [#21][]: Guard::Test::Notifier.notify - did not use :failed image if test results included errors but NO failures. ([@carlost][])
51
+ - [#21][]: `Guard::Test::Notifier.notify` did not use :failed image if test results included errors but NO failures. ([@carlost][])
38
52
 
39
53
  ## 0.4.2 - November 19, 2011
40
54
 
41
- ### Bug fix:
55
+ ### Bug fix
42
56
 
43
- - [#19][]: Fixed "superclass mismatch for class Test (TypeError)" thanks to [@gertas][]. ([@rymai][])
57
+ - [#19][]: Fix "superclass mismatch for class Test (TypeError)" thanks to [@gertas][]. ([@rymai][])
44
58
 
45
59
  ## 0.4.1 - November 3, 2011
46
60
 
47
- ### Bugs fixes:
61
+ ### Bugs fixes
48
62
 
49
- - [#18][]: Fixed a conflict with test_benchmark that was preventing guard-test from running. ([@rymai][])
50
- - [#11][]: Fixed a "No such file to load -- guard/notifier" when running guard without bundler. ([@rymai][])
63
+ - [#18][]: Fix a conflict with test_benchmark that was preventing guard-test from running. ([@rymai][])
64
+ - [#11][]: Fix a "No such file to load -- guard/notifier" when running guard without bundler. ([@rymai][])
51
65
 
52
66
  ## 0.4.0 - September 29, 2011
53
67
 
54
- ### Regression:
68
+ ### Regression
55
69
 
56
- - Removed support of [turn](https://github.com/guard/guard-spork) gem since "Turn is no longer compatible with TestUnit 2.0+. TestUnit and MiniTest are deverging and after some consideration it was decided that Turn's goal is to support Ruby's native test framework, whatever it may be." quoted from Turn's [release.txt](https://github.com/TwP/turn/blob/master/Release.txt). ([@rymai][])
70
+ - Remove support of [turn](https://github.com/guard/guard-spork) gem since "Turn is no longer compatible with TestUnit 2.0+. TestUnit and MiniTest are deverging and after some consideration it was decided that Turn's goal is to support Ruby's native test framework, whatever it may be." quoted from Turn's [release.txt](https://github.com/TwP/turn/blob/master/Release.txt). ([@rymai][])
57
71
 
58
- ### New feature:
72
+ ### New feature
59
73
 
60
74
  - New `:drb` option enabling the use of [`spork-testunit`](https://github.com/timcharper/spork-testunit) gem (be sure to use [guard-spork](https://github.com/guard/guard-spork) as well). ([@rymai][])
61
75
 
62
76
  ## 0.3.1 - September 11, 2011
63
77
 
64
- ### New feature:
78
+ ### New feature
65
79
 
66
80
  - [#13][]: New `test_paths` option to look for test files under other paths than `test`. ([@Ask11][])
67
81
 
68
- ### Improvement:
82
+ ### Improvement
69
83
 
70
84
  - [#15][]: Simplify some checks. ([@dasch][])
71
85
 
72
86
  ## 0.3.0 - June 14, 2011
73
87
 
74
- ### Improvement:
88
+ ### Improvement
75
89
 
76
90
  - Internal cleaning. ([@rymai][])
77
91
 
78
92
  ## 0.3.0.rc5 - June 9, 2011
79
93
 
80
- ### Bugs fixes:
94
+ ### Bugs fixes
81
95
 
82
- - Fixed bug that was preventing tests from running. ([@rymai][])
83
- - Fixed the `fastfail` runner that was displaying a green dot even for a failing test. ([@rymai][])
84
- - Removed the `:notification` option. Use the new Guard method instead. ([@rymai][])
96
+ - Fix bug that was preventing tests from running. ([@rymai][])
97
+ - Fix the `fastfail` runner that was displaying a green dot even for a failing test. ([@rymai][])
98
+ - Remove the `:notification` option. Use the new Guard method instead. ([@rymai][])
85
99
 
86
- ### New feature:
100
+ ### New feature
87
101
 
88
102
  - Turn seems to work fine now... ([@rymai][])
89
103
 
90
- ### Improvement:
104
+ ### Improvement
91
105
 
92
- - Consider 'test_*.rb' as test files as well. ([@uk-ar][])
106
+ - Consider `test_*.rb` as test files as well. ([@uk-ar][])
93
107
 
94
108
  ## 0.3.0.rc4 - June 3, 2011
95
109
 
96
- ### Bugs fix:
110
+ ### Bugs fix
97
111
 
98
112
  - Add a require that was making the guard be fired by Guard! :'( ([@rymai][])
99
113
 
100
114
  ## 0.3.0.rc3 - June 3, 2011
101
115
 
102
- ### Bugs fix:
116
+ ### Bugs fix
103
117
 
104
118
  - Actually make the tests run. ([@rymai][])
105
119
 
106
- ### Regression:
120
+ ### Regression
107
121
 
108
122
  - Turn doesn't want to run, so remove sentences that say that it is supported for now. Note: The code is still here, only the command line doesn't seem to output anything... ([@rymai][])
109
123
 
110
124
  ## 0.3.0.rc2 - June 2, 2011
111
125
 
112
- ### New features:
126
+ ### New features
113
127
 
114
128
  - New `:cli` option (nil by default) to pass arbitrary CLI arguments to the Ruby/Turn command that runs the tests. ([@rymai][])
115
129
  - New `:notification` option (true by default) to disable notification (Growl/Inotify). ([@rymai][])
@@ -117,24 +131,24 @@
117
131
  - New `:all_after_pass` option (true by default) to run all tests after changed tests pass. ([@rymai][])
118
132
  - New `:keep_failed` option (true by default) to keep failed tests until them pass. ([@rymai][])
119
133
 
120
- ### Improvements:
134
+ ### Improvements
121
135
 
122
- - Added compatibility with 1.8.6, 1.8.7, 1.9.2, REE, Rubinius and JRuby. ([@rymai][])
136
+ - Add compatibility with 1.8.6, 1.8.7, 1.9.2, REE, Rubinius and JRuby. ([@rymai][])
123
137
  - Internal changes inspired by [guard-minitest](https://github.com/guard/guard-minitest). ([@rymai][])
124
138
 
125
139
  ## 0.1.6 - January 24, 2011
126
140
 
127
- ### Bugs fix:
141
+ ### Bugs fix
128
142
 
129
143
  - [#2][]: Fixed a bug introduced in 0.1.5 where test/ was not added to the $LOAD_PATH. ([@rymai][])
130
144
 
131
145
  ## 0.1.5 - January 21, 2011
132
146
 
133
- - Updated gem dependencies. ([@rymai][])
147
+ - Update gem dependencies. ([@rymai][])
134
148
 
135
149
  ## 0.1.4 - December 15, 2010
136
150
 
137
- ### Bugs fix:
151
+ ### Bugs fix
138
152
 
139
153
  - [#1][]: Include errors count to determine the "flag" to display in notification. ([@gregorymostizky][])
140
154
 
@@ -152,6 +166,8 @@
152
166
  [#34]: https://github.com/guard/guard/issues/34
153
167
  [#35]: https://github.com/guard/guard/issues/35
154
168
  [#38]: https://github.com/guard/guard/issues/38
169
+ [#40]: https://github.com/guard/guard/issues/40
170
+ [#41]: https://github.com/guard/guard/issues/41
155
171
  [@Ask11]: https://github.com/Ask11
156
172
  [@amiel]: https://github.com/amiel
157
173
  [@carlost]: https://github.com/carlost
@@ -162,5 +178,6 @@
162
178
  [@gregorymostizky]: https://github.com/gregorymostizky
163
179
  [@jgrau]: https://github.com/jgrau
164
180
  [@pastorius]: https://github.com/pastorius
181
+ [@pgaertig]: https://github.com/pgaertig
165
182
  [@rymai]: https://github.com/rymai
166
183
  [@uk-ar]: https://github.com/uk-ar
data/README.md CHANGED
@@ -1,43 +1,26 @@
1
- # Guard::Test [![Build Status](https://secure.travis-ci.org/guard/guard-test.png?branch=master)](http://travis-ci.org/guard/guard-test)
1
+ # Guard::Test
2
+ [![Gem Version](https://badge.fury.io/rb/guard-test.png)](http://badge.fury.io/rb/guard-test) [![Build Status](https://travis-ci.org/guard/guard-test.png?branch=master)](https://travis-ci.org/guard/guard-test) [![Dependency Status](https://gemnasium.com/guard/guard-test.png)](https://gemnasium.com/guard/guard-test) [![Code Climate](https://codeclimate.com/github/guard/guard-test.png)](https://codeclimate.com/github/guard/guard-test) [![Coverage Status](https://coveralls.io/repos/guard/guard-test/badge.png?branch=master)](https://coveralls.io/r/guard/guard-test)
2
3
 
3
4
  Test::Unit guard allows to automatically & intelligently launch tests when files are modified or created.
4
5
 
5
- If you have any questions about Guard or Guard::Test, please join us on our [Google group](http://groups.google.com/group/guard-dev) or on `#guard` (irc.freenode.net).
6
-
7
- ## Features
8
-
9
- - Compatible with test-unit 2.
10
- - Tested on Ruby 1.8.7, 1.9.2, REE, Rubinius and JRuby.
6
+ * Compatible with Test::Unit 2.
7
+ * Tested against Ruby 1.8.7, 1.9.3, REE, Rubinius & JRuby.
11
8
 
12
9
  ## Install
13
10
 
14
- Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
11
+ Please be sure to have [Guard](https://github.com/guard/guard) installed before continuing.
15
12
 
16
- If you're using Bundler, add it to your `Gemfile`:
13
+ Add the gem to your Gemfile (inside the `:development` or `:tool` group):
17
14
 
18
- ```ruby
19
- group :tools do
15
+ ``` ruby
16
+ group :development do
20
17
  gem 'guard-test'
21
18
  end
22
19
  ```
23
20
 
24
- Note for Rails users: you should add it inside a `:tools` group (or at least not the `:development` nor `:test` group) to avoid the loading of the gem on Rails boot.
25
-
26
- and run:
27
-
28
- ```bash
29
- $ bundle install
30
- ```
31
-
32
- or manually install the gem:
33
-
34
- ```bash
35
- $ gem install guard-test
36
- ```
21
+ Add guard definition to your Guardfile by running this command:
37
22
 
38
- Add Guard definition to your `Guardfile` by running this command:
39
-
40
- ```bash
23
+ ``` bash
41
24
  $ guard init test
42
25
  ```
43
26
 
@@ -57,7 +40,7 @@ Specify ruby-prof as application's dependency in Gemfile to run benchmarks.
57
40
  Rails automatically generates a performance test stub in the `test/performance` directory which can trigger this error.
58
41
  Either add `ruby-prof` to your `Gemfile` (inside the `test` group):
59
42
 
60
- ```ruby
43
+ ``` ruby
61
44
  group :test do
62
45
  gem 'ruby-prof'
63
46
  end
@@ -69,9 +52,9 @@ Or remove the test if it isn't necessary.
69
52
 
70
53
  Please read the [Guard usage doc](https://github.com/guard/guard#readme).
71
54
 
72
- ## Guardfile
55
+ By default, Guard::Test watch for files matching `test_*.rb` or `*_test{s,}.rb` in the `test` directory (this directory can be changed with the `test_paths` option, see below).
73
56
 
74
- Guard::Test can be adapted to any kind of projects.
57
+ ## Guardfile
75
58
 
76
59
  See the [template Guardfile](https://github.com/guard/guard-test/blob/master/lib/guard/test/templates/Guardfile) for some examples.
77
60
 
@@ -83,17 +66,20 @@ Please read the [Guard documentation](https://github.com/guard/guard#readme) for
83
66
 
84
67
  ### Available options
85
68
 
86
- * `bundler` (`Boolean`) - Whether or not to use `bundle exec` to run tests. Default to `true` if a you have a Gemfile in the current directory.
87
- * `rubygems` (`Boolean`) - Whether or not to require rubygems (if bundler isn't used) when running the tests. Default to `false`.
88
- * `rvm` (`Array<String>`) - Directly run your specs against multiple Rubies. Default to `nil`.
89
- * `drb` (`Boolean`) - Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit). Default to `false`.
90
- * `zeus` (`Boolean`) - Run your tests with [`zeus`](https://github.com/burke/zeus). Default to `false`.
91
- * `include` (`Array<String>`) - Pass arbitrary include paths to the command that runs the tests. Default to `['test']`.
92
- * `cli` (`String`) - Pass arbitrary CLI arguments to the command that runs the tests. Default to `nil`.
93
- * `all_on_start` (`Boolean`) - Run all tests on Guard startup. Default to `true`.
94
- * `all_after_pass` (`Boolean`) - Run all tests after the current run tests pass. Default to `true`.
95
- * `keep_failed` (`Boolean`) - Re-run failing tests until they pass. Default to `true`.
96
- * `test_paths` (`Array<String>`) - Array of paths that where are located the test files. Default to `['test']`.
69
+ ``` ruby
70
+ :bundler => false # Whether or not to use `bundle exec` to run tests, default: true (if a you have a Gemfile in the current directory)
71
+ :rubygems => true # Whether or not to require rubygems (if bundler isn't used) when running the tests, default: false
72
+ :rvm => ['1.9.3', 'jruby'] # Directly run your specs against multiple Rubies, default: nil
73
+ :drb => true # Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit), default: false
74
+ :zeus => true # Run your tests with [`zeus`](https://github.com/burke/zeus), default: false
75
+ :spring => true # Run your tests with [`spring`](https://github.com/jonleighton/spring), default: false
76
+ :include => ['foo', 'bar'] # Pass arbitrary include paths to the command that runs the tests, default: ['test']
77
+ :cli => 'color' # Pass arbitrary CLI arguments to the command that runs the tests, default: nil
78
+ :all_on_start => false # Run all tests on Guard startup, default: true.
79
+ :all_after_pass => false # Run all tests after the current run tests pass, default: true
80
+ :keep_failed => false # Re-run failing tests until they pass, default: true
81
+ :test_paths => ['spec'] # Array of paths that where are located the test files, default: ['test']
82
+ ```
97
83
 
98
84
  #### `drb` option
99
85
 
@@ -101,43 +87,31 @@ When true, notifications are disabled. This might be fixed in future releases.
101
87
 
102
88
  #### `zeus` option
103
89
 
104
- When true, the `include` option is disregarded, as it does not work with `zeus`' test runner.
105
-
106
- The zeus server process (`zeus start`) must already be running in another terminal.
90
+ When true, the `include` option is disregarded, as it does not work with `zeus`' test runner.
107
91
 
108
- #### `test_paths` option
109
-
110
- By default, guard-test will only look for test files within `test/` in your project root. You can add any paths using the `:test_paths` option:
111
-
112
- ```ruby
113
- guard :test, :test_paths => ['test', 'vendor/plugins/recaptcha/test', 'any/path/test'] do
114
- # ...
115
- end
116
- ```
92
+ The zeus server process (`zeus start`) must already be running in another terminal (you can use [guard-zeus](http://rubygems.org/gems/guard-zeus) for that).
117
93
 
118
94
  ## Development
119
95
 
120
- - Source hosted on GitHub: https://github.com/guard/guard-test
121
- - Report issues and feature requests to GitHub Issues: https://github.com/guard/guard-test/issues
96
+ * Documentation hosted at [RubyDoc](http://rubydoc.info/gems/guard-test/frames).
97
+ * Source hosted at [GitHub](https://github.com/guard/guard-test).
122
98
 
123
- Pull requests are very welcome! Please try to follow these simple "rules", though:
99
+ Pull requests are very welcome! Please try to follow these simple rules if applicable:
124
100
 
125
- - Please create a topic branch for every separate change you make;
126
- - Make sure your patches are well tested;
127
- - Update the [README](https://github.com/guard/guard-test/blob/master/README.md) (if applicable);
128
- - Update the [CHANGELOG](https://github.com/guard/guard-test/blob/master/CHANGELOG.md) and add yourself to the list of contributors (see at the bottom of the CHANGELOG for examples);
129
- - Please do not change the version number.
101
+ * Please create a topic branch for every separate change you make.
102
+ * Make sure your patches are well tested. All specs must pass on [Travis CI](https://travis-ci.org/guard/guard-test).
103
+ * Update the [Yard](http://yardoc.org/) documentation.
104
+ * Update the [README](https://github.com/guard/guard-test/blob/master/README.md).
105
+ * Update the [CHANGELOG](https://github.com/guard/guard-test/blob/master/CHANGELOG.md) for noteworthy changes (don't forget to run `bundle exec pimpmychangelog` and watch the magic happen)!
106
+ * Please **do not change** the version number.
130
107
 
131
- For questions please join us on our [Google group](http://groups.google.com/group/guard-dev) or on `#guard` (irc.freenode.net).
108
+ For questions please join us in our [Google group](http://groups.google.com/group/guard-dev) or on
109
+ `#guard` (irc.freenode.net).
132
110
 
133
111
  ## Author
134
112
 
135
- [Rémy Coutable](https://github.com/rymai)
113
+ [Rémy Coutable](https://github.com/rymai) ([@rymai](http://twitter.com/rymai), [rymai.me](http://rymai.me))
136
114
 
137
115
  ## Contributors
138
116
 
139
117
  https://github.com/guard/guard-test/contributors
140
-
141
- ## Kudos
142
-
143
- Many thanks to [Thibaud Guillaume-Gentil](https://github.com/thibaudgg) for creating the excellent [Guard](https://github.com/guard/guard) gem.
@@ -7,8 +7,8 @@ require 'test/unit/version'
7
7
  module Guard
8
8
  class Test < Guard
9
9
 
10
- autoload :Runner, 'guard/test/runner'
11
- autoload :Inspector, 'guard/test/inspector'
10
+ require 'guard/test/runner'
11
+ require 'guard/test/inspector'
12
12
 
13
13
  def initialize(watchers = [], options = {})
14
14
  super
@@ -25,7 +25,8 @@ module Guard
25
25
  end
26
26
 
27
27
  def start
28
- ::Guard::UI.info("Guard::Test #{TestVersion::VERSION} is running, with Test::Unit #{::Test::Unit::VERSION}!", :reset => true)
28
+ ::Guard::UI.info("Guard::Test #{TestVersion::VERSION} is running, " +
29
+ "with Test::Unit #{::Test::Unit::VERSION}!", :reset => true)
29
30
  run_all if @options[:all_on_start]
30
31
  end
31
32
 
@@ -1,10 +1,11 @@
1
1
  # encoding: utf-8
2
-
3
2
  module Guard
4
3
  class Test
5
4
  class Runner
6
5
 
7
- def initialize(options = {})
6
+ attr_reader :options
7
+
8
+ def initialize(opts = {})
8
9
  @options = {
9
10
  :bundler => File.exist?("#{Dir.pwd}/Gemfile"),
10
11
  :rubygems => false,
@@ -12,32 +13,33 @@ module Guard
12
13
  :include => ['test'],
13
14
  :drb => false,
14
15
  :zeus => false,
16
+ :spring => false,
15
17
  :cli => ''
16
- }.merge(options)
18
+ }.merge(opts)
17
19
  end
18
20
 
19
- def run(paths, options = {})
21
+ def run(paths, opts = {})
20
22
  return true if paths.empty?
21
23
 
22
- ::Guard::UI.info(options[:message] || "Running: #{paths.join(' ')}", :reset => true)
24
+ ::Guard::UI.info(opts[:message] || "Running: #{paths.join(' ')}", :reset => true)
23
25
 
24
26
  system(test_unit_command(paths))
25
27
  end
26
28
 
27
29
  def bundler?
28
30
  if @bundler.nil?
29
- @bundler = @options[:bundler] && !drb? && !zeus?
31
+ @bundler = options[:bundler] && !drb? && !zeus? && !spring?
30
32
  end
31
33
  @bundler
32
34
  end
33
35
 
34
36
  def rubygems?
35
- !bundler? && !zeus? && @options[:rubygems]
37
+ !bundler? && !zeus? && !spring? && options[:rubygems]
36
38
  end
37
39
 
38
40
  def drb?
39
41
  if @drb.nil?
40
- @drb = @options[:drb]
42
+ @drb = options[:drb]
41
43
  begin
42
44
  require 'spork-testunit'
43
45
  rescue LoadError
@@ -49,45 +51,66 @@ module Guard
49
51
 
50
52
  def zeus?
51
53
  if @zeus.nil?
52
- @zeus = @options[:zeus]
54
+ @zeus = options[:zeus]
53
55
  ::Guard::UI.info('Using zeus to run the tests') if @zeus
54
56
  end
55
57
  @zeus
56
58
  end
57
-
59
+
60
+ def spring?
61
+ if @spring.nil?
62
+ @spring = options[:spring]
63
+ ::Guard::UI.info('Using spring to run the tests') if @spring
64
+ end
65
+ @spring
66
+ end
67
+
58
68
  private
59
69
 
60
70
  def test_unit_command(paths)
61
- cmd_parts = []
62
- cmd_parts << "rvm #{@options[:rvm].join(',')} exec" unless @options[:rvm].empty?
63
- cmd_parts << 'bundle exec' if bundler?
64
- cmd_parts << case true
65
- when drb?
66
- 'testdrb'
67
- when zeus?
68
- 'zeus test'
69
- else
70
- 'ruby'
71
- end
72
- cmd_parts << Array(@options[:include]).map { |path| "-I#{path}" } unless zeus?
73
- cmd_parts << '-r bundler/setup' if bundler?
74
- cmd_parts << '-rubygems' if rubygems?
75
-
76
- unless drb? || zeus?
77
- cmd_parts << "-r #{File.expand_path("../guard_test_runner", __FILE__)}"
78
- cmd_parts << "-e \"%w[#{paths.join(' ')}].each { |p| load p }\""
79
- end
71
+ cmd_parts = executables
72
+ cmd_parts.concat(includes_and_requires(paths))
73
+ cmd_parts.concat(test_files_list(paths))
74
+ cmd_parts.concat(command_options)
75
+ cmd_parts << options[:cli]
76
+
77
+ cmd_parts.compact.join(' ').strip
78
+ end
80
79
 
81
- paths.each { |path| cmd_parts << "\"./#{path}\"" }
80
+ def executables
81
+ parts = []
82
+ parts << "rvm #{options[:rvm].join(',')} exec" unless options[:rvm].empty?
83
+ parts << 'bundle exec' if bundler?
84
+ parts << case true
85
+ when drb? then 'testdrb'
86
+ when zeus? then 'zeus test'
87
+ when spring? then 'spring testunit'
88
+ else 'ruby'; end
89
+ end
82
90
 
83
- unless drb? || zeus?
84
- cmd_parts << '--use-color'
85
- cmd_parts << '--runner=guard'
91
+ def includes_and_requires(paths)
92
+ parts = []
93
+ parts << Array(options[:include]).map { |path| "-I#{path}" } unless zeus? || spring?
94
+ parts << '-r bundler/setup' if bundler?
95
+ parts << '-rubygems' if rubygems?
96
+ unless drb? || zeus? || spring?
97
+ parts << "-r #{File.expand_path("../guard_test_runner", __FILE__)}"
98
+ parts << "-e \"%w[#{paths.join(' ')}].each { |p| load p }\""
86
99
  end
87
100
 
88
- cmd_parts << @options[:cli]
101
+ parts
102
+ end
103
+
104
+ def test_files_list(paths)
105
+ paths.map { |path| "\"./#{path}\"" }
106
+ end
89
107
 
90
- cmd_parts.compact.join(' ').strip
108
+ def command_options
109
+ if drb? || zeus? || spring?
110
+ []
111
+ else
112
+ ['--use-color', '--runner=guard']
113
+ end
91
114
  end
92
115
 
93
116
  end