Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4521850
commit 1a66ce9
Showing
4 changed files
with
53 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,44 @@ | |||
RSpec ships with a specialized subclass of Autotest. You can pass the --style | |||
option to the autotest command to tell Autotest to load this subclass: | |||
|
|||
$ autotest --style rspec2 | |||
|
|||
Alternatively, you can configure your project such that this happens | |||
automatically, in which case you can just type: | |||
|
|||
$ autotest | |||
|
|||
Here's how: | |||
|
|||
#### rspec-2.3 and up | |||
|
|||
Add a .rspec file to the project's root directory if it's not already there. | |||
You can use this to configure RSpec options, but you don't have to. As long as | |||
RSpec sees this file, it will tell Autotest to use the "rspec2" style. | |||
|
|||
#### rspec-2.2 and down | |||
|
|||
Add an autotest directory to the project root, and add a file named discover.rb to | |||
that directory with the following: | |||
|
|||
# in ./autotest/discover.rb | |||
Autotest.add_discovery {"rspec2"} | |||
|
|||
NOTE that this approach will not be supported by future versions of ZenTest on | |||
Ruby-1.9. | |||
|
|||
### `bundle exec` | |||
|
|||
By default, RSpec adds `bundle exec` to the command generated by Autotest if | |||
there is a `Gemfile` in the project root directory. | |||
|
|||
As of rspec-core-2.5, this automatic inclusion of 'bundle exec' is deprecated. | |||
If you want to include 'bundle exec', use Autotest's bundler plugin by adding | |||
a .autotest file to the project root directory with the following: | |||
|
|||
require 'autotest/bundler' | |||
|
|||
If you want to skip 'bundle exec', pass `--skip-bundler` to the `autotest` | |||
command and it won't include `bundle exec` even if there is a `Gemfile`. | |||
|
|||
autotest -- --skip-bundler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters