Skip to content

Commit

Permalink
README and CHANGELOG updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Rémy Coutable committed Sep 29, 2011
1 parent ac2f83c commit 35b6e27
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 56 deletions.
32 changes: 20 additions & 12 deletions CHANGELOG.md
@@ -1,16 +1,26 @@
## 0.4.0 - September 29, 2011 - ([@rymai][])

### Regression:

- 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).

### New feature:

- 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).

## 0.3.1 - September 11, 2011

### New features:
### New feature:

- Pull request [#13](https://github.com/guard/guard-test/pull/13): New `test_paths` option to look for test files under other paths than `test`. ([@Ask11][])

### Improvements:
### Improvement:

- Pull request [#15](https://github.com/guard/guard-test/pull/15): Simplify some checks. ([@dasch][])

## 0.3.0 - June 14, 2011

### Improvements:
### Improvement:

- Internal cleaning. ([@rymai][])

Expand All @@ -22,7 +32,7 @@
- Fixed the `fastfail` runner that was displaying a green dot even for a failing test. ([@rymai][])
- Removed the `:notification` option. Use the new Guard method instead. ([@rymai][])

### New features:
### New feature:

- Turn seems to work fine now... ([@rymai][])

Expand All @@ -32,13 +42,13 @@

## 0.3.0.rc4 - June 3, 2011 - ([@rymai][])

### Bugs fixes:
### Bugs fix:

- Add a require that was making the guard be fired by Guard! :'(

## 0.3.0.rc3 - June 3, 2011 - ([@rymai][])

### Bugs fixes:
### Bugs fix:

- Actually make the tests run.

Expand All @@ -56,26 +66,24 @@
- New `:all_after_pass` option (true by default) to run all tests after changed tests pass.
- New `:keep_failed` option (true by default) to keep failed tests until them pass.

### Improvement:
### Improvements:

- Added compatibility with 1.8.6, 1.8.7, 1.9.2, REE, Rubinius and JRuby.
- Internal changes inspired by [guard-minitest](https://github.com/guard/guard-minitest).

## 0.1.6 - January 24, 2011

### Bugs fixes:
### Bugs fix:

- Issue [#2](https://github.com/guard/guard-test/issues/2): Fixed a bug introduced in 0.1.5 where test/ was not added to the $LOAD_PATH. (reported by [@jgrau][], fixed by [@rymai][])

## 0.1.5 - January 21, 2011

### Changes:
## 0.1.5 - January 21, 2011 - ([@rymai][])

- Updated gem dependencies

## 0.1.4 - December 15, 2010

### Bugs fixes:
### Bugs fix:

- Pull request [#1](https://github.com/guard/guard-test/pull/1): Include errors count to determine the "flag" to display in notification. ([@gregorymostizky][])

Expand Down
66 changes: 22 additions & 44 deletions README.md
@@ -1,4 +1,4 @@
# Guard::Test [![Build Status](http://travis-ci.org/guard/guard-test.png)](http://travis-ci.org/guard/guard-test)
# Guard::Test [![Build Status](https://secure.travis-ci.org/guard/guard-test.png)](http://travis-ci.org/guard/guard-test)

Test::Unit guard allows to automatically & intelligently launch tests when files are modified or created.

Expand Down Expand Up @@ -39,67 +39,45 @@ $ guard init test

## Usage

Please read [Guard usage doc](https://github.com/guard/guard#readme).
Please read the [Guard usage doc](https://github.com/guard/guard#readme).

## Guardfile

Guard::Test can be adapted to any kind of projects.

### Standard Ruby project
See the [template Guardfile](https://github.com/guard/guard-test/blob/master/lib/guard/test/templates/Guardfile) for some examples.

```ruby
guard 'test' do
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch('test/test_helper.rb') { "test" }
end
```
Please read the [Guard documentation](https://github.com/guard/guard#readme) for more info about the Guardfile DSL.

### Ruby On Rails project
## Options

```ruby
guard 'test' do
watch(%r{^app/models/(.+)\.rb$}) { |m| "test/unit/#{m[1]}_test.rb" }
watch(%r{^app/controllers/(.+)\.rb$}) { |m| "test/functional/#{m[1]}_test.rb" }
watch(%r{^app/views/.+\.rb$}) { "test/integration" }
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test.rb$})
watch('app/controllers/application_controller.rb') { ["test/functional", "test/integration"] }
watch('test/test_helper.rb') { "test" }
end
```
**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.

Please read the [Guard documentation](https://github.com/guard/guard#readme) for more info about the Guardfile DSL.
### Available options

## Options
* `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.
* `rvm` (`Array<String>`) - Directly run your specs against multiple Rubies. Default to `nil`.
* `drb` (`Boolean`) - Run your tests with [`spork-testunit`](https://github.com/timcharper/spork-testunit). Default to `false`.
* `cli` (`String`) - Pass arbitrary CLI arguments to the command that runs the tests. Default to `nil`.
* `all_on_start` (`Boolean`) - Run all tests on Guard startup. Default to `true`.
* `all_after_pass` (`Boolean`) - Run all tests after the current run tests pass. Default to `true`.
* `keep_failed` (`Boolean`) - Re-run failing tests until they pass. Default to `true`.
* `test_paths` (`Array<String>`) - Array of paths that where are located the test files. Default to `['test']`.

Guard::Test allows you to choose between two different runners (Guard::Test's runners are inherited from Test::Unit's console runner):
#### `drb` option

- `default`: Display tests results as they happen, with different chars (green `.` for pass, red `F` for fail, purple `E` for error)
and print failures/errors messages & backtraces when all the tests are finished. Obviously, this is the guard-test default.
- `fastfail`: Display tests results as they happen and print failures/errors messages & backtraces immediately.
When true, notifications are disabled. This might be fixed in future releases.

#### `test_paths` option

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:

```ruby
guard 'test', :test_paths => ['test', 'vendor/plugins/recaptcha/test', 'any/path/test'] do
guard :test, :test_paths => ['test', 'vendor/plugins/recaptcha/test', 'any/path/test'] do
# ...
end
```

Available options:

```ruby
:rvm => ['1.8.7', '1.9.2'] # directly run your specs on multiple Rubies, default: nil
:bundler => false # don't use "bundle exec" to run the test command, default: true if a you have a Gemfile
:runner => 'fastfail' # default: 'default'
:cli => "-v" # pass arbitrary CLI arguments to the Ruby command that runs the tests, default: nil
:all_on_start => false # don't run all the tests at startup, default: true
:all_after_pass => false # don't run all tests after changed tests pass, default: true
:keep_failed => false # keep failed tests until them pass, default: true
:test_paths => ['spec'] # specify an array of paths that contain test files
```

## Development

- Source hosted on GitHub: https://github.com/guard/guard-test
Expand All @@ -109,8 +87,8 @@ Pull requests are very welcome! Please try to follow these simple "rules", thoug

- Please create a topic branch for every separate change you make;
- Make sure your patches are well tested;
- Update the README (if applicable);
- Update the CHANGELOG (maybe not for a typo but don't hesitate!);
- Update the [README](https://github.com/guard/guard-test/blob/master/README.md) (if applicable);
- 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);
- Please do not change the version number.

For questions please join us on our [Google group](http://groups.google.com/group/guard-dev) or on `#guard` (irc.freenode.net).
Expand Down

0 comments on commit 35b6e27

Please sign in to comment.