From 032a016564e32ad1d23dd464fb9f40ed6d628a1e Mon Sep 17 00:00:00 2001 From: David Chelimsky Date: Wed, 12 Nov 2008 12:38:12 -0600 Subject: [PATCH] add simple support for accessing have_tag, have_selector and have_xpath matchers from rspec proper --- lib/webrat/rspec-rails.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/webrat/rspec-rails.rb diff --git a/lib/webrat/rspec-rails.rb b/lib/webrat/rspec-rails.rb new file mode 100644 index 0000000..ad81883 --- /dev/null +++ b/lib/webrat/rspec-rails.rb @@ -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 \ No newline at end of file