Permalink
Browse files

docs

  • Loading branch information...
dchelimsky committed Jan 27, 2011
1 parent 4521850 commit 1a66ce914f46066636ed310d1b87e4c723c98531
Showing with 53 additions and 84 deletions.
  1. +1 −0 features/.nav
  2. +44 −0 features/Autotest.md
  3. +4 −34 features/README.md
  4. +4 −50 features/Upgrade.md
View
@@ -1,5 +1,6 @@
- Upgrade.md
- Changelog.md
+- Autotest.md
- example_groups:
- basic_structure.feature
- shared_example_group.feature
View
@@ -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
View
@@ -8,40 +8,10 @@ rspec-core provides the structure for RSpec code examples:
end
end
-### Autotest integration
-
-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"}
-
## Issues
-The documentation for rspec-core is a work in progress. We'll be adding
-Cucumber features over time, and clarifying existing ones. If you have
-specific features you'd like to see added, find the existing documentation
-incomplete or confusing, or, better yet, wish to write a missing Cucumber
-feature yourself, please [submit an
-issue](http://github.com/rspec/rspec-core/issues) or a [pull
+This documentation is [open
+source](https://github.com/rspec/rspec-core/tree/master/features), and a work
+in progress. If you find it incomplete or confusing, please [submit an
+issue](http://github.com/rspec/rspec-core/issues), or, better yet, [a pull
request](http://github.com/rspec/rspec-core).
View
@@ -1,33 +1,3 @@
-# rspec-core-2.5
-
-## autotest
-
-### 2.5
-
-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
-
-### 2.3
-
-As of rspec-core-2.3, RSpec's Autotest extension is loaded when you run the
-`autotest` command if there is a `.rspec` file in the project's root directory.
-
-NOTE that rspec-core-2.0, 2.1, and 2.2 required an autotest/discover.rb file in
-the project's root directory. This worked with some, but not all versions of
-autotest and/or the autotest command that ships with ZenTest. This new approach
-works regardless of which version of autotest/ZenTest you are using.
-
# rspec-core-2.3
## `config.expect_with`
@@ -193,9 +163,9 @@ passed to `it_should_behave_like`.
See [features/example\_groups/shared\_example\_group.feature](http://github.com/rspec/rspec-core/blob/master/features/example_groups/shared_example_group.feature) for more information.
NOTICE: The including example groups no longer have access to any of the
-methods, hooks, or state defined inside a shared group. This will break specs
-that were using shared example groups to extend the behavior of including
-groups in any way besides their intended purpose: to add examples to a group.
+methods, hooks, or state defined inside a shared group. This will break rspec-1
+specs that were using shared example groups to extend the behavior of including
+groups.
# Upgrading from rspec-1.x
@@ -266,23 +236,7 @@ A few things changed in the Rake task used to run specs:
### autotest
-RSpec-2 works with autotest as follows:
-
- rspec --configure autotest
-
-This adds `./autotest/discover.rb` with:
-
- Autotest.add_discovery { "rspec2" }
-
-Now, on the command line just type:
-
- autotest
-
-Or, if you're using bundler:
-
- bundle exec autotest
-
-The `autospec` command is a thing of the past.
+`autospec` is dead. Long live `autotest`.
### RSpec is the new Spec

0 comments on commit 1a66ce9

Please sign in to comment.