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")
9 # Spec::Rails::Expectations::Matchers provides several expectation matchers
10 # intended to work with Rails components like models and responses. For example:
12 # response.should redirect_to("some/url") #redirect_to(url) is the matcher.
14 # In addition to those you see below, the arbitrary predicate feature of RSpec
15 # makes the following available as well:
17 # response.should be_success #passes if response.success?
18 # response.should be_redirect #passes if response.redirect?
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.
25 # For more info on <tt>assert_select</tt>, see the relevant Rails documentation.