Sha256: 3d6b51b935c614a2b8f2acfe7c5bbceae42ae58edba5ea960498155b415e2246

Contents?: true

Size: 1.46 KB

Versions: 209

Compression:

Stored size: 1.46 KB

Contents

RSpec ships with a specialized subclass of Autotest. To use it, just add a
`.rspec` file to your project's root directory, and run the `autotest` command
as normal:

    $ autotest

## Bundler

The `autotest` command generates a shell command that runs your specs. If you
are using Bundler, and you want the shell command to include `bundle exec`,
require the Autotest bundler plugin in a `.autotest` file in the project's root
directory or your home directory:

    # in .autotest
    require "autotest/bundler"

## Upgrading from previous versions of rspec

Previous versions of RSpec used a different mechanism for telling autotest to
invoke RSpec's Autotest extension: it generated an `autotest/discover.rb` file
in the project's root directory. This is no longer necessary with the new
approach of RSpec looking for a `.rspec` file, so feel free to delete the
`autotest/discover.rb` file in the project root if you have one.

## Gotchas

### Invalid Option: --tty

The `--tty` option was [added in rspec-core-2.2.1](changelog), and is used
internally by RSpec. If you see an error citing it as an invalid option, you'll
probably see there are two or more versions of rspec-core in the backtrace: one
< 2.2.1 and one >= 2.2.1.

This usually happens because you have a newer rspec-core installed, and an
older rspec-core specified in a Bundler Gemfile. If this is the case, you can:

1. specify the newer version in the Gemfile (recommended)
2. prefix the `autotest` command with `bundle exec`

Version data entries

209 entries across 154 versions & 26 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/Autotest.md
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/Autotest.md
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.9.0/features/Autotest.md
classiccms-0.7.5 vendor/bundle/gems/rspec-core-2.10.0/features/Autotest.md
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.9.0/features/Autotest.md
classiccms-0.7.4 vendor/bundle/gems/rspec-core-2.10.0/features/Autotest.md
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.10.0/features/Autotest.md
classiccms-0.7.3 vendor/bundle/gems/rspec-core-2.9.0/features/Autotest.md
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/Autotest.md
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/Autotest.md
rspec-core-2.99.2 features/Autotest.md
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/Autotest.md
rspec-core-2.99.1 features/Autotest.md
rspec-core-2.99.0 features/Autotest.md