Upgraded Rails and RSpec
[monkeycharger.git] / vendor / plugins / rspec_on_rails / lib / spec / rails / matchers.rb
blobc5258966d1ca73ed0aa79af661f79dc3e279615e
1 dir = File.dirname(__FILE__)
2 require File.expand_path("#{dir}/matchers/assert_select")
3 require File.expand_path("#{dir}/matchers/have_text")
4 require File.expand_path("#{dir}/matchers/redirect_to")
5 require File.expand_path("#{dir}/matchers/render_template")
7 module Spec
8   module Rails
9     # Spec::Rails::Expectations::Matchers provides several expectation matchers
10     # intended to work with Rails components like models and responses. For example:
11     #
12     #   response.should redirect_to("some/url") #redirect_to(url) is the matcher.
13     #
14     # In addition to those you see below, the arbitrary predicate feature of RSpec
15     # makes the following available as well:
16     #
17     #   response.should be_success #passes if response.success?
18     #   response.should be_redirect #passes if response.redirect?
19     #
20     # Note that many of these matchers are part of a wrapper of <tt>assert_select</tt>, so
21     # the documentation comes straight from that with some slight modifications.
22     # <tt>assert_select</tt> is a Test::Unit extension originally contributed to the
23     # Rails community as a plugin by Assaf Arkin and eventually shipped as part of Rails.
24     #
25     # For more info on <tt>assert_select</tt>, see the relevant Rails documentation.
26     module Matchers
27     end
28   end
29 end