Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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
Something went wrong with that request. Please try again.