Skip to content
Dorian edited this page Nov 15, 2011 · 11 revisions

You are reading a wiki that is maintained by anybody with access to github, and is therefore subject to outdated and incorrect information. Please do feel free to read and contribute, but bear in mind that this does not represent official documentation.

The official documentation can be found at http://relishapp.com/rspec

Install

gem install rspec --version "~> 2.0.0"

This will install four gems:

rspec
rspec-core
rspec-expectations
rspec-mocks

It also installs a new rspec command (which will replace the spec command from rspec-1), and an updated spec command that tries to help rspec-1 and rspec-2 play nice together.

See autotest for info about using autotest with rspec-2.

spec/spec_helper.rb

require 'rspec'

RSpec.configure do |c|
  c.mock_with :rspec
end
Clone this wiki locally