Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tag: v2.1.0
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (20 sloc) 1.021 kB

RSpec Expectations

rspec-expectations adds should and should_not to every object and includes RSpec::Matchers, a library of standard matchers.

Documentation

Install

gem install rspec               # for rspec-core, rspec-expectations, rspec-mocks
gem install rspec-expecctations # for rspec-core only

Matchers

Matchers are objects used to compose expectations:

result.should eq("this value")

In that example, eq("this value") returns a Matcher object that compares the actual result to the expected "this value".

Contribute

See http://github.com/rspec/rspec-dev

Also see

Jump to Line
Something went wrong with that request. Please try again.