guard-test 0.4.3 → 0.5.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.
- data/CHANGELOG.md +15 -0
- data/README.md +31 -2
- data/lib/guard/test.rb +1 -1
- data/lib/guard/test/runner.rb +10 -4
- data/lib/guard/test/version.rb +1 -1
- metadata +38 -16
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,17 @@
|
|
1
|
+
## 0.5.0 - June 2, 2012
|
2
|
+
|
3
|
+
### Bug fix:
|
4
|
+
|
5
|
+
- [#24](https://github.com/guard/guard-test/issues/24): Add note for Rails projects using profile/benchmark tests in README. ([@coderjoe][])
|
6
|
+
|
7
|
+
### Changes:
|
8
|
+
|
9
|
+
- Updated for Guard 1.1
|
10
|
+
|
11
|
+
### New feature:
|
12
|
+
|
13
|
+
- [#20](https://github.com/guard/guard-test/issues/20): Add the `:rubygems` options for projects that don't use Bundler. ([@rymai][])
|
14
|
+
|
1
15
|
## 0.4.3 - December 19, 2011 - ([@rymai][])
|
2
16
|
|
3
17
|
### Bug fix:
|
@@ -108,6 +122,7 @@
|
|
108
122
|
|
109
123
|
[@Ask11]: https://github.com/Ask11
|
110
124
|
[@carlost]: https://github.com/carlost
|
125
|
+
[@coderjoe]: https://github.com/coderjoe
|
111
126
|
[@dasch]: https://github.com/dasch
|
112
127
|
[@gertas]: https://github.com/gertas
|
113
128
|
[@gregorymostizky]: https://github.com/gregorymostizky
|
data/README.md
CHANGED
@@ -13,12 +13,16 @@ If you have any questions about Guard or Guard::Test, please join us on our [Goo
|
|
13
13
|
|
14
14
|
Please be sure to have [Guard](https://github.com/guard/guard) installed before continue.
|
15
15
|
|
16
|
-
If you're using Bundler, add it to your `Gemfile
|
16
|
+
If you're using Bundler, add it to your `Gemfile`:
|
17
17
|
|
18
18
|
```ruby
|
19
|
-
|
19
|
+
group :tools do
|
20
|
+
gem 'guard-test'
|
21
|
+
end
|
20
22
|
```
|
21
23
|
|
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
|
+
|
22
26
|
and run:
|
23
27
|
|
24
28
|
```bash
|
@@ -37,6 +41,30 @@ Add Guard definition to your `Guardfile` by running this command:
|
|
37
41
|
$ guard init test
|
38
42
|
```
|
39
43
|
|
44
|
+
## Ruby on Rails
|
45
|
+
|
46
|
+
Ruby on Rails lazy loads gems as needed in its test suite.
|
47
|
+
As a result Guard::Test may not be able to run all tests until the gem dependencies are resolved.
|
48
|
+
|
49
|
+
To solve the issue either add the missing dependencies or remove the tests.
|
50
|
+
|
51
|
+
Example:
|
52
|
+
|
53
|
+
```
|
54
|
+
Specify ruby-prof as application's dependency in Gemfile to run benchmarks.
|
55
|
+
```
|
56
|
+
|
57
|
+
Rails automatically generates a performance test stub in the `test/performance` directory which can trigger this error.
|
58
|
+
Either add `ruby-prof` to your `Gemfile` (inside the `test` group):
|
59
|
+
|
60
|
+
```ruby
|
61
|
+
group :test do
|
62
|
+
gem 'ruby-prof'
|
63
|
+
end
|
64
|
+
```
|
65
|
+
|
66
|
+
Or remove the test if it isn't necessary.
|
67
|
+
|
40
68
|
## Usage
|
41
69
|
|
42
70
|
Please read the [Guard usage doc](https://github.com/guard/guard#readme).
|
@@ -56,6 +84,7 @@ Please read the [Guard documentation](https://github.com/guard/guard#readme) for
|
|
56
84
|
### Available options
|
57
85
|
|
58
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`.
|
59
88
|
* `rvm` (`Array<String>`) - Directly run your specs against multiple Rubies. Default to `nil`.
|
60
89
|
* `drb` (`Boolean`) - Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit). Default to `false`.
|
61
90
|
* `cli` (`String`) - Pass arbitrary CLI arguments to the command that runs the tests. Default to `nil`.
|
data/lib/guard/test.rb
CHANGED
data/lib/guard/test/runner.rb
CHANGED
@@ -6,10 +6,11 @@ module Guard
|
|
6
6
|
|
7
7
|
def initialize(options = {})
|
8
8
|
@options = {
|
9
|
-
:bundler
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
9
|
+
:bundler => File.exist?("#{Dir.pwd}/Gemfile"),
|
10
|
+
:rubygems => false,
|
11
|
+
:rvm => [],
|
12
|
+
:drb => false,
|
13
|
+
:cli => ""
|
13
14
|
}.merge(options)
|
14
15
|
end
|
15
16
|
|
@@ -28,6 +29,10 @@ module Guard
|
|
28
29
|
@bundler
|
29
30
|
end
|
30
31
|
|
32
|
+
def rubygems?
|
33
|
+
!bundler? && @options[:rubygems]
|
34
|
+
end
|
35
|
+
|
31
36
|
def drb?
|
32
37
|
if @drb.nil?
|
33
38
|
@drb = @options[:drb]
|
@@ -54,6 +59,7 @@ module Guard
|
|
54
59
|
end
|
55
60
|
cmd_parts << "-Itest"
|
56
61
|
cmd_parts << "-r bundler/setup" if bundler?
|
62
|
+
cmd_parts << "-rubygems" if rubygems?
|
57
63
|
|
58
64
|
unless drb?
|
59
65
|
cmd_parts << "-r #{File.expand_path("../guard_test_runner", __FILE__)}"
|
data/lib/guard/test/version.rb
CHANGED
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.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,27 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2012-06-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: guard
|
16
|
-
requirement:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version:
|
21
|
+
version: 1.1.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements:
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.1.0
|
25
30
|
- !ruby/object:Gem::Dependency
|
26
31
|
name: test-unit
|
27
|
-
requirement:
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
28
33
|
none: false
|
29
34
|
requirements:
|
30
35
|
- - ~>
|
@@ -32,32 +37,47 @@ dependencies:
|
|
32
37
|
version: '2.2'
|
33
38
|
type: :runtime
|
34
39
|
prerelease: false
|
35
|
-
version_requirements:
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ~>
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '2.2'
|
36
46
|
- !ruby/object:Gem::Dependency
|
37
47
|
name: bundler
|
38
|
-
requirement:
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
39
49
|
none: false
|
40
50
|
requirements:
|
41
51
|
- - ~>
|
42
52
|
- !ruby/object:Gem::Version
|
43
|
-
version: '1.
|
53
|
+
version: '1.1'
|
44
54
|
type: :development
|
45
55
|
prerelease: false
|
46
|
-
version_requirements:
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.1'
|
47
62
|
- !ruby/object:Gem::Dependency
|
48
63
|
name: rspec
|
49
|
-
requirement:
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
50
65
|
none: false
|
51
66
|
requirements:
|
52
67
|
- - ~>
|
53
68
|
- !ruby/object:Gem::Version
|
54
|
-
version: '2.
|
69
|
+
version: '2.10'
|
55
70
|
type: :development
|
56
71
|
prerelease: false
|
57
|
-
version_requirements:
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '2.10'
|
58
78
|
description: Guard::Test automatically run your tests on file modification.
|
59
79
|
email:
|
60
|
-
-
|
80
|
+
- remy@rymai.me
|
61
81
|
executables: []
|
62
82
|
extensions: []
|
63
83
|
extra_rdoc_files: []
|
@@ -90,6 +110,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
90
110
|
- - ! '>='
|
91
111
|
- !ruby/object:Gem::Version
|
92
112
|
version: '0'
|
113
|
+
segments:
|
114
|
+
- 0
|
115
|
+
hash: -3295867921855432415
|
93
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
117
|
none: false
|
95
118
|
requirements:
|
@@ -98,9 +121,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
121
|
version: 1.3.6
|
99
122
|
requirements: []
|
100
123
|
rubyforge_project: guard-test
|
101
|
-
rubygems_version: 1.8.
|
124
|
+
rubygems_version: 1.8.23
|
102
125
|
signing_key:
|
103
126
|
specification_version: 3
|
104
127
|
summary: Guard gem for test-unit 2
|
105
128
|
test_files: []
|
106
|
-
has_rdoc:
|