guard-test 1.0.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +1 -183
- data/README.md +28 -20
- data/lib/guard/test.rb +9 -9
- data/lib/guard/test/guard_test_runner.rb +4 -6
- data/lib/guard/test/notifier.rb +5 -5
- data/lib/guard/test/runner.rb +14 -16
- data/lib/guard/test/templates/Guardfile +17 -7
- data/lib/guard/test/version.rb +1 -1
- metadata +35 -35
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2c6d18197be39429390ba420c6ef9e4641c4ed93
|
4
|
+
data.tar.gz: ceca5a755c7bc93bd9a923e29131d7d88ee6949f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7c701bec79783277faa199d5a85b120e49757f7c85d65371dacd9c2619662d686698c07667df82f19e413182d6414d79e4932f7746fe04651087c6f5f8d4362b
|
7
|
+
data.tar.gz: 19c7d9661cf860b44e47a83d4aab2b70544776b1ef082baf1db24b156c30f5b19a8769bf30526ff32e64fdc856308e176672674460e6f156ebd5e275b3058487
|
data/CHANGELOG.md
CHANGED
@@ -1,183 +1 @@
|
|
1
|
-
|
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
|
-
|
15
|
-
## 0.8.0 - March 24, 2013
|
16
|
-
|
17
|
-
### New feature
|
18
|
-
|
19
|
-
- [#38][]: Add support for running tests via `zeus`. ([@djmaze][])
|
20
|
-
|
21
|
-
## 0.7.0 - November 6, 2012
|
22
|
-
|
23
|
-
### New feature
|
24
|
-
|
25
|
-
- [#35][]: Support `include:` option to extend the load path of the test runner. ([@amiel][])
|
26
|
-
|
27
|
-
## 0.6.0 - November 3, 2012
|
28
|
-
|
29
|
-
### New feature
|
30
|
-
|
31
|
-
- [#34][]: Support for `*_tests.rb`. ([@pastorius][])
|
32
|
-
|
33
|
-
## 0.5.0 - June 2, 2012
|
34
|
-
|
35
|
-
### Bug fix
|
36
|
-
|
37
|
-
- [#24][]: Add note for Rails projects using profile/benchmark tests in README. ([@coderjoe][])
|
38
|
-
|
39
|
-
### Changes
|
40
|
-
|
41
|
-
- Updat for Guard 1.1. ([@rymai][])
|
42
|
-
|
43
|
-
### New feature
|
44
|
-
|
45
|
-
- [#20][]: Add the `:rubygems` options for projects that don't use Bundler. ([@rymai][])
|
46
|
-
|
47
|
-
## 0.4.3 - December 19, 2011
|
48
|
-
|
49
|
-
### Bug fix
|
50
|
-
|
51
|
-
- [#21][]: `Guard::Test::Notifier.notify` did not use :failed image if test results included errors but NO failures. ([@carlost][])
|
52
|
-
|
53
|
-
## 0.4.2 - November 19, 2011
|
54
|
-
|
55
|
-
### Bug fix
|
56
|
-
|
57
|
-
- [#19][]: Fix "superclass mismatch for class Test (TypeError)" thanks to [@gertas][]. ([@rymai][])
|
58
|
-
|
59
|
-
## 0.4.1 - November 3, 2011
|
60
|
-
|
61
|
-
### Bugs fixes
|
62
|
-
|
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][])
|
65
|
-
|
66
|
-
## 0.4.0 - September 29, 2011
|
67
|
-
|
68
|
-
### Regression
|
69
|
-
|
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][])
|
71
|
-
|
72
|
-
### New feature
|
73
|
-
|
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][])
|
75
|
-
|
76
|
-
## 0.3.1 - September 11, 2011
|
77
|
-
|
78
|
-
### New feature
|
79
|
-
|
80
|
-
- [#13][]: New `test_paths` option to look for test files under other paths than `test`. ([@Ask11][])
|
81
|
-
|
82
|
-
### Improvement
|
83
|
-
|
84
|
-
- [#15][]: Simplify some checks. ([@dasch][])
|
85
|
-
|
86
|
-
## 0.3.0 - June 14, 2011
|
87
|
-
|
88
|
-
### Improvement
|
89
|
-
|
90
|
-
- Internal cleaning. ([@rymai][])
|
91
|
-
|
92
|
-
## 0.3.0.rc5 - June 9, 2011
|
93
|
-
|
94
|
-
### Bugs fixes
|
95
|
-
|
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][])
|
99
|
-
|
100
|
-
### New feature
|
101
|
-
|
102
|
-
- Turn seems to work fine now... ([@rymai][])
|
103
|
-
|
104
|
-
### Improvement
|
105
|
-
|
106
|
-
- Consider `test_*.rb` as test files as well. ([@uk-ar][])
|
107
|
-
|
108
|
-
## 0.3.0.rc4 - June 3, 2011
|
109
|
-
|
110
|
-
### Bugs fix
|
111
|
-
|
112
|
-
- Add a require that was making the guard be fired by Guard! :'( ([@rymai][])
|
113
|
-
|
114
|
-
## 0.3.0.rc3 - June 3, 2011
|
115
|
-
|
116
|
-
### Bugs fix
|
117
|
-
|
118
|
-
- Actually make the tests run. ([@rymai][])
|
119
|
-
|
120
|
-
### Regression
|
121
|
-
|
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][])
|
123
|
-
|
124
|
-
## 0.3.0.rc2 - June 2, 2011
|
125
|
-
|
126
|
-
### New features
|
127
|
-
|
128
|
-
- New `:cli` option (nil by default) to pass arbitrary CLI arguments to the Ruby/Turn command that runs the tests. ([@rymai][])
|
129
|
-
- New `:notification` option (true by default) to disable notification (Growl/Inotify). ([@rymai][])
|
130
|
-
- New `:all_on_start` option (true by default) to not run all the tests at startup. ([@rymai][])
|
131
|
-
- New `:all_after_pass` option (true by default) to run all tests after changed tests pass. ([@rymai][])
|
132
|
-
- New `:keep_failed` option (true by default) to keep failed tests until them pass. ([@rymai][])
|
133
|
-
|
134
|
-
### Improvements
|
135
|
-
|
136
|
-
- Add compatibility with 1.8.6, 1.8.7, 1.9.2, REE, Rubinius and JRuby. ([@rymai][])
|
137
|
-
- Internal changes inspired by [guard-minitest](https://github.com/guard/guard-minitest). ([@rymai][])
|
138
|
-
|
139
|
-
## 0.1.6 - January 24, 2011
|
140
|
-
|
141
|
-
### Bugs fix
|
142
|
-
|
143
|
-
- [#2][]: Fixed a bug introduced in 0.1.5 where test/ was not added to the $LOAD_PATH. ([@rymai][])
|
144
|
-
|
145
|
-
## 0.1.5 - January 21, 2011
|
146
|
-
|
147
|
-
- Update gem dependencies. ([@rymai][])
|
148
|
-
|
149
|
-
## 0.1.4 - December 15, 2010
|
150
|
-
|
151
|
-
### Bugs fix
|
152
|
-
|
153
|
-
- [#1][]: Include errors count to determine the "flag" to display in notification. ([@gregorymostizky][])
|
154
|
-
|
155
|
-
<!--- The following link definition list is generated by PimpMyChangelog --->
|
156
|
-
[#1]: https://github.com/guard/guard/issues/1
|
157
|
-
[#2]: https://github.com/guard/guard/issues/2
|
158
|
-
[#11]: https://github.com/guard/guard/issues/11
|
159
|
-
[#13]: https://github.com/guard/guard/issues/13
|
160
|
-
[#15]: https://github.com/guard/guard/issues/15
|
161
|
-
[#18]: https://github.com/guard/guard/issues/18
|
162
|
-
[#19]: https://github.com/guard/guard/issues/19
|
163
|
-
[#20]: https://github.com/guard/guard/issues/20
|
164
|
-
[#21]: https://github.com/guard/guard/issues/21
|
165
|
-
[#24]: https://github.com/guard/guard/issues/24
|
166
|
-
[#34]: https://github.com/guard/guard/issues/34
|
167
|
-
[#35]: https://github.com/guard/guard/issues/35
|
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
|
171
|
-
[@Ask11]: https://github.com/Ask11
|
172
|
-
[@amiel]: https://github.com/amiel
|
173
|
-
[@carlost]: https://github.com/carlost
|
174
|
-
[@coderjoe]: https://github.com/coderjoe
|
175
|
-
[@dasch]: https://github.com/dasch
|
176
|
-
[@djmaze]: https://github.com/djmaze
|
177
|
-
[@gertas]: https://github.com/gertas
|
178
|
-
[@gregorymostizky]: https://github.com/gregorymostizky
|
179
|
-
[@jgrau]: https://github.com/jgrau
|
180
|
-
[@pastorius]: https://github.com/pastorius
|
181
|
-
[@pgaertig]: https://github.com/pgaertig
|
182
|
-
[@rymai]: https://github.com/rymai
|
183
|
-
[@uk-ar]: https://github.com/uk-ar
|
1
|
+
# Moved to [GitHub releases](https://github.com/guard/guard-test/releases) page.
|
data/README.md
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
# Guard::Test
|
2
|
+
|
2
3
|
[![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)
|
3
4
|
|
4
|
-
Test
|
5
|
+
Guard::Test allows to automatically & intelligently launch tests when files are modified or created.
|
5
6
|
|
6
7
|
* Compatible with Test::Unit 2.
|
7
|
-
* Tested against Ruby 1.
|
8
|
+
* Tested against Ruby 1.9.3, 2.0.0, Rubinius & JRuby (1.9 mode only).
|
8
9
|
|
9
10
|
## Install
|
10
11
|
|
@@ -62,28 +63,32 @@ Please read the [Guard documentation](https://github.com/guard/guard#readme) for
|
|
62
63
|
|
63
64
|
## Options
|
64
65
|
|
65
|
-
**Deprecation notice:** The `:runner` option is deprecated. If you had set it to "fastfail", it is now the default in test-unit 2, but if you want the opposite, you can pass the
|
66
|
+
**Deprecation notice:** The `:runner` option is deprecated. If you had set it to "fastfail", it is now the default in test-unit 2, but if you want the opposite, you can pass the `cli: '--no-show-detail-immediately'` option instead.
|
66
67
|
|
67
68
|
### Available options
|
68
69
|
|
69
70
|
``` ruby
|
70
|
-
:
|
71
|
-
:
|
72
|
-
:
|
73
|
-
:
|
74
|
-
:
|
75
|
-
:
|
76
|
-
:
|
77
|
-
:
|
78
|
-
:
|
79
|
-
:
|
80
|
-
:
|
81
|
-
:
|
71
|
+
bundler: false # Whether or not to use `bundle exec` to run tests, default: true (if a you have a Gemfile in the current directory)
|
72
|
+
rubygems: true # Whether or not to require rubygems (if bundler isn't used) when running the tests, default: false
|
73
|
+
rvm: ['1.9.3', 'jruby'] # Directly run your specs against multiple Rubies, default: nil
|
74
|
+
spring: true # Run your tests with [`spring`](https://github.com/jonleighton/spring), default: false
|
75
|
+
zeus: true # Run your tests with [`zeus`](https://github.com/burke/zeus), default: false
|
76
|
+
drb: true # Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit), default: false
|
77
|
+
include: ['foo', 'bar'] # Pass arbitrary include paths to the command that runs the tests, default: ['test']
|
78
|
+
cli: 'color' # Pass arbitrary CLI arguments to the command that runs the tests, default: nil
|
79
|
+
all_on_start: false # Run all tests on Guard startup, default: true.
|
80
|
+
all_after_pass: false # Run all tests after the current run tests pass, default: true
|
81
|
+
keep_failed: false # Re-run failing tests until they pass, default: true
|
82
|
+
test_paths: ['spec'] # Array of paths that where are located the test files, default: ['test']
|
82
83
|
```
|
83
84
|
|
84
|
-
#### `
|
85
|
+
#### `spring` option
|
85
86
|
|
86
|
-
|
87
|
+
**Important:** The `spring testunit` command of official version 0.0.8 of spring is running only file specified as first argument, other are ignored. Fortunately this issue has been fixed recently in spring master and all test files given in arguments are invoked, see [#102](https://github.com/jonleighton/spring/pull/102). However that has not been packaged yet, therefore while waiting for spring 0.0.9 release we recommend to use (in your Gemfile):
|
88
|
+
|
89
|
+
```ruby
|
90
|
+
gem 'spring', github: 'jonleighton/spring'
|
91
|
+
```
|
87
92
|
|
88
93
|
#### `zeus` option
|
89
94
|
|
@@ -91,6 +96,10 @@ When true, the `include` option is disregarded, as it does not work with `zeus`'
|
|
91
96
|
|
92
97
|
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).
|
93
98
|
|
99
|
+
#### `drb` option
|
100
|
+
|
101
|
+
When true, notifications are disabled. This might be fixed in future releases.
|
102
|
+
|
94
103
|
## Development
|
95
104
|
|
96
105
|
* Documentation hosted at [RubyDoc](http://rubydoc.info/gems/guard-test/frames).
|
@@ -102,7 +111,6 @@ Pull requests are very welcome! Please try to follow these simple rules if appli
|
|
102
111
|
* Make sure your patches are well tested. All specs must pass on [Travis CI](https://travis-ci.org/guard/guard-test).
|
103
112
|
* Update the [Yard](http://yardoc.org/) documentation.
|
104
113
|
* 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
114
|
* Please **do not change** the version number.
|
107
115
|
|
108
116
|
For questions please join us in our [Google group](http://groups.google.com/group/guard-dev) or on
|
@@ -110,8 +118,8 @@ For questions please join us in our [Google group](http://groups.google.com/grou
|
|
110
118
|
|
111
119
|
## Author
|
112
120
|
|
113
|
-
[Rémy Coutable](https://github.com/rymai) ([@rymai](http://twitter.com/rymai), [
|
121
|
+
[Rémy Coutable](https://github.com/rymai) ([@rymai](http://twitter.com/rymai), [rym.ai](http://rym.ai))
|
114
122
|
|
115
123
|
## Contributors
|
116
124
|
|
117
|
-
https://github.com/guard/guard-test/contributors
|
125
|
+
[https://github.com/guard/guard-test/graphs/contributors](https://github.com/guard/guard-test/graphs/contributors)
|
data/lib/guard/test.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'guard'
|
3
|
-
require 'guard/
|
3
|
+
require 'guard/plugin'
|
4
4
|
require 'guard/test/version'
|
5
5
|
require 'test/unit/version'
|
6
6
|
|
7
7
|
module Guard
|
8
|
-
class Test <
|
8
|
+
class Test < Plugin
|
9
9
|
|
10
10
|
require 'guard/test/runner'
|
11
11
|
require 'guard/test/inspector'
|
12
12
|
|
13
|
-
def initialize(
|
13
|
+
def initialize(options = {})
|
14
14
|
super
|
15
15
|
@options = {
|
16
|
-
:
|
17
|
-
:
|
18
|
-
:
|
19
|
-
:
|
16
|
+
all_on_start: true,
|
17
|
+
all_after_pass: true,
|
18
|
+
keep_failed: true,
|
19
|
+
test_paths: ['test']
|
20
20
|
}.update(options)
|
21
21
|
@last_failed = false
|
22
22
|
@failed_paths = []
|
@@ -26,14 +26,14 @@ module Guard
|
|
26
26
|
|
27
27
|
def start
|
28
28
|
::Guard::UI.info("Guard::Test #{TestVersion::VERSION} is running, " +
|
29
|
-
"with Test::Unit #{::Test::Unit::VERSION}!", :
|
29
|
+
"with Test::Unit #{::Test::Unit::VERSION}!", reset: true)
|
30
30
|
run_all if @options[:all_on_start]
|
31
31
|
end
|
32
32
|
|
33
33
|
def run_all
|
34
34
|
Inspector.test_paths = @options[:test_paths]
|
35
35
|
test_paths = @options[:test_paths].clone # because clean - cleaning variable
|
36
|
-
passed = @runner.run(Inspector.clean(test_paths), :
|
36
|
+
passed = @runner.run(Inspector.clean(test_paths), message: 'Running all tests')
|
37
37
|
|
38
38
|
@failed_paths = [] if passed
|
39
39
|
@last_failed = !passed
|
@@ -1,8 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
$:.push File.expand_path('../', __FILE__)
|
3
|
-
|
4
2
|
require 'test/unit/ui/console/testrunner'
|
5
|
-
require 'notifier'
|
3
|
+
require 'guard/test/notifier'
|
6
4
|
|
7
5
|
# Thanks to Adam Sanderson for the really good starting point:
|
8
6
|
# http://endofline.wordpress.com/2008/02/11/a-custom-testrunner-to-scratch-an-itch/
|
@@ -13,8 +11,8 @@ class GuardTestRunner < ::Test::Unit::UI::Console::TestRunner
|
|
13
11
|
|
14
12
|
def initialize(suite, options = {})
|
15
13
|
super
|
16
|
-
@color_scheme["pass"] = ::Test::Unit::Color.new("green", :
|
17
|
-
@color_scheme["failure"] = ::Test::Unit::Color.new("red", :
|
14
|
+
@color_scheme["pass"] = ::Test::Unit::Color.new("green", foreground: true, bold: true)
|
15
|
+
@color_scheme["failure"] = ::Test::Unit::Color.new("red", foreground: true, bold: true)
|
18
16
|
end
|
19
17
|
|
20
18
|
protected
|
@@ -36,4 +34,4 @@ class GuardTestRunner < ::Test::Unit::UI::Console::TestRunner
|
|
36
34
|
|
37
35
|
end
|
38
36
|
|
39
|
-
Test::Unit::AutoRunner.register_runner(:
|
37
|
+
Test::Unit::AutoRunner.register_runner(:guard_test) { |r| GuardTestRunner }
|
data/lib/guard/test/notifier.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
require 'rubygems'
|
3
3
|
require 'guard'
|
4
|
-
require 'guard/
|
4
|
+
require 'guard/plugin'
|
5
5
|
require 'guard/notifier'
|
6
6
|
|
7
7
|
module Guard
|
8
|
-
class Test <
|
8
|
+
class Test < Plugin
|
9
9
|
module Notifier
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def notify(result, elapsed_time)
|
13
13
|
::Guard::Notifier.notify(
|
14
14
|
summary(result) + "\n\n" + duration(elapsed_time),
|
15
|
-
:
|
16
|
-
:
|
15
|
+
title: "Test::Unit results",
|
16
|
+
image: result.passed? ? :success : :failed
|
17
17
|
)
|
18
18
|
end
|
19
19
|
|
@@ -42,4 +42,4 @@ module Guard
|
|
42
42
|
|
43
43
|
end
|
44
44
|
end
|
45
|
-
end
|
45
|
+
end
|
data/lib/guard/test/runner.rb
CHANGED
@@ -7,21 +7,21 @@ module Guard
|
|
7
7
|
|
8
8
|
def initialize(opts = {})
|
9
9
|
@options = {
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:
|
14
|
-
:
|
15
|
-
:
|
16
|
-
:
|
17
|
-
:
|
10
|
+
bundler: File.exist?("#{Dir.pwd}/Gemfile"),
|
11
|
+
rubygems: false,
|
12
|
+
rvm: [],
|
13
|
+
include: %w[lib:test],
|
14
|
+
drb: false,
|
15
|
+
zeus: false,
|
16
|
+
spring: false,
|
17
|
+
cli: ''
|
18
18
|
}.merge(opts)
|
19
19
|
end
|
20
20
|
|
21
21
|
def run(paths, opts = {})
|
22
22
|
return true if paths.empty?
|
23
23
|
|
24
|
-
::Guard::UI.info(opts[:message] || "Running: #{paths.join(' ')}", :
|
24
|
+
::Guard::UI.info(opts[:message] || "Running: #{paths.join(' ')}", reset: true)
|
25
25
|
|
26
26
|
system(test_unit_command(paths))
|
27
27
|
end
|
@@ -90,13 +90,11 @@ module Guard
|
|
90
90
|
|
91
91
|
def includes_and_requires(paths)
|
92
92
|
parts = []
|
93
|
-
parts << Array(options[:include]).map { |path| "-I#{path}" } unless zeus? || spring?
|
93
|
+
parts << Array(options[:include]).map { |path| "-I\"#{path}\"" } unless zeus? || spring?
|
94
|
+
parts << "-I\"#{File.expand_path('..', __FILE__)}\""
|
94
95
|
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 }\""
|
99
|
-
end
|
96
|
+
parts << '-r rubygems' if rubygems?
|
97
|
+
parts << '-r guard_test_runner' unless drb? || zeus? || spring?
|
100
98
|
|
101
99
|
parts
|
102
100
|
end
|
@@ -109,7 +107,7 @@ module Guard
|
|
109
107
|
if drb? || zeus? || spring?
|
110
108
|
[]
|
111
109
|
else
|
112
|
-
['--use-color', '--runner=
|
110
|
+
['--use-color', '--runner=guard_test']
|
113
111
|
end
|
114
112
|
end
|
115
113
|
|
@@ -1,11 +1,21 @@
|
|
1
1
|
guard :test do
|
2
|
-
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
3
2
|
watch(%r{^test/.+_test\.rb$})
|
4
|
-
watch('test/test_helper.rb') {
|
3
|
+
watch('test/test_helper.rb') { 'test' }
|
5
4
|
|
6
|
-
#
|
7
|
-
watch(%r{^
|
8
|
-
|
9
|
-
|
10
|
-
watch(
|
5
|
+
# Non-rails
|
6
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
7
|
+
|
8
|
+
# Rails 4
|
9
|
+
# watch(%r{^app/(.+)\.rb}) { |m| "test/#{m[1]}_test.rb" }
|
10
|
+
# watch(%r{^app/controllers/application_controller\.rb}) { 'test/controllers' }
|
11
|
+
# watch(%r{^app/controllers/(.+)_controller\.rb}) { |m| "test/integration/#{m[1]}_test.rb" }
|
12
|
+
# watch(%r{^app/views/(.+)_mailer/.+}) { |m| "test/mailers/#{m[1]}_mailer_test.rb" }
|
13
|
+
# watch(%r{^lib/(.+)\.rb}) { |m| "test/lib/#{m[1]}_test.rb" }
|
14
|
+
|
15
|
+
# Rails < 4
|
16
|
+
# watch %r{^app/models/(.+)\.rb$} { |m| "test/unit/#{m[1]}_test.rb" }
|
17
|
+
# watch %r{^app/controllers/(.+)\.rb$} { |m| "test/functional/#{m[1]}_test.rb" }
|
18
|
+
# watch %r{^app/views/(.+)/.+\.erb$} { |m| "test/functional/#{m[1]}_controller_test.rb" }
|
19
|
+
# watch %r{^app/views/.+$} { 'test/integration' }
|
20
|
+
# watch 'app/controllers/application_controller.rb' { ['test/functional', 'test/integration'] }
|
11
21
|
end
|
data/lib/guard/test/version.rb
CHANGED
metadata
CHANGED
@@ -1,36 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 2.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Rémy Coutable
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-05
|
11
|
+
date: 2013-10-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: guard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: '
|
19
|
+
version: '2.0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
26
|
+
version: '2.0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: test-unit
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
31
|
- - ~>
|
36
32
|
- !ruby/object:Gem::Version
|
@@ -38,7 +34,6 @@ dependencies:
|
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
38
|
- - ~>
|
44
39
|
- !ruby/object:Gem::Version
|
@@ -46,22 +41,33 @@ dependencies:
|
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: bundler
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - '>='
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
47
|
+
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
62
69
|
description: Guard::Test automatically run your tests on file modification.
|
63
|
-
email:
|
64
|
-
- remy@rymai.me
|
70
|
+
email: remy@rymai.me
|
65
71
|
executables: []
|
66
72
|
extensions: []
|
67
73
|
extra_rdoc_files: []
|
@@ -76,34 +82,28 @@ files:
|
|
76
82
|
- CHANGELOG.md
|
77
83
|
- LICENSE
|
78
84
|
- README.md
|
79
|
-
homepage:
|
80
|
-
licenses:
|
85
|
+
homepage: https://rubygems.org/gems/guard-test
|
86
|
+
licenses:
|
87
|
+
- MIT
|
88
|
+
metadata: {}
|
81
89
|
post_install_message:
|
82
90
|
rdoc_options: []
|
83
91
|
require_paths:
|
84
92
|
- lib
|
85
93
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
94
|
requirements:
|
88
|
-
- -
|
95
|
+
- - '>='
|
89
96
|
- !ruby/object:Gem::Version
|
90
|
-
version:
|
91
|
-
segments:
|
92
|
-
- 0
|
93
|
-
hash: 4483033003693316797
|
97
|
+
version: 1.9.2
|
94
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
-
none: false
|
96
99
|
requirements:
|
97
|
-
- -
|
100
|
+
- - '>='
|
98
101
|
- !ruby/object:Gem::Version
|
99
102
|
version: '0'
|
100
|
-
segments:
|
101
|
-
- 0
|
102
|
-
hash: 4483033003693316797
|
103
103
|
requirements: []
|
104
104
|
rubyforge_project:
|
105
|
-
rubygems_version:
|
105
|
+
rubygems_version: 2.0.7
|
106
106
|
signing_key:
|
107
|
-
specification_version:
|
108
|
-
summary: Guard
|
107
|
+
specification_version: 4
|
108
|
+
summary: Guard plugin for Test::Unit 2
|
109
109
|
test_files: []
|