add simple support for accessing have_tag, have_selector and have_xpath matchers from rspec proper

This commit is contained in:
David Chelimsky 2008-11-12 12:38:12 -06:00
parent 82c6be380e
commit 032a016564

13
lib/webrat/rspec-rails.rb Normal file
View File

@ -0,0 +1,13 @@
# Supports using the matchers in controller, helper, and view specs if you're
# using rspec-rails. Just add a require statement to spec/spec_helper.rb:
#
# require 'webrat/rspec-rails'
#
require "webrat/core/matchers"
Spec::Runner.configure do |config|
# rspec should support :type => [:controller, :helper, :view] - but until it does ...
config.include(Webrat::Matchers, :type => :controller)
config.include(Webrat::Matchers, :type => :helper)
config.include(Webrat::Matchers, :type => :view)
end