Skip to content
This repository
branch: master

Remove rspec-collection_matchers code.

rspec-collection_matchers provides all this functionality now.
latest commit a25e62e888
Myron Marston myronmarston authored April 22, 2014
..
Octocat-spinner-32 controller_specs Adds a bit more clarifying details December 27, 2013
Octocat-spinner-32 feature_specs We can only test rspec-rails 3 with capybara on 1.9.3 and above July 22, 2013
Octocat-spinner-32 helper_specs A widget needs an ID for widget_path to work correctly April 07, 2013
Octocat-spinner-32 mailer_specs Identify ruby code for syntax highlighting October 12, 2012
Octocat-spinner-32 matchers Update generators and tests to use doubles/actual models March 02, 2014
Octocat-spinner-32 model_specs Remove rspec-collection_matchers code. April 22, 2014
Octocat-spinner-32 request_specs Fixes typo in link href December 11, 2012
Octocat-spinner-32 routing_specs Update README to use expect syntax April 06, 2013
Octocat-spinner-32 step_definitions Use Cucumber's 'step' method to remove deprecation warnings. March 17, 2012
Octocat-spinner-32 support We can only test rspec-rails 3 with capybara on 1.9.3 and above July 22, 2013
Octocat-spinner-32 view_specs Doc: "infers controller action" heading March 27, 2014
Octocat-spinner-32 .nav Remove rspec-collection_matchers code. April 22, 2014
Octocat-spinner-32 Generators.md Add feature generator and include in list of available generators June 19, 2013
Octocat-spinner-32 GettingStarted.md doc update April 26, 2011
Octocat-spinner-32 README.md Bumps Gemfile line to 3.0 November 21, 2013
Octocat-spinner-32 RailsVersions.md add page on rspec/rails version compatibility May 16, 2011
Octocat-spinner-32 Transactions.md Change a few more places to use `expect` April 06, 2013
Octocat-spinner-32 Upgrade.md Change a few more places to use `expect` April 06, 2013
Octocat-spinner-32 directory_structure.feature Allows metadata to override the type of Rails spec October 26, 2013
README.md

rspec-rails extends Rails' built-in testing framework to support rspec examples for requests, controllers, models, views, helpers, mailers and routing.

Rails

rspec-rails 3 supports Rails 3.x and 4.x. For earlier versions of Rails, you need rspec-rails 1.

Install

gem install rspec-rails

This installs the following gems:

rspec
rspec-core
rspec-expectations
rspec-mocks
rspec-rails

Configure

Add rspec-rails to the :test and :development groups in the Gemfile:

group :test, :development do
  gem 'rspec-rails', '~> 3.0.0.beta'
end

It needs to be in the :development group to expose generators and rake tasks without having to type RAILS_ENV=test.

Now you can run:

script/rails generate rspec:install

This adds the spec directory and some skeleton files, including a .rspec file.

Issues

The documentation for rspec-rails 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 or a pull request.

Something went wrong with that request. Please try again.