On 17/03/2008, Ashley Moran <[EMAIL PROTECTED]> wrote: > > Has anyone managed this? >
Cracked it. Really ugly, but my stories/helper.rb looks like this ENV["RAILS_ENV"] = "test_integration" require File.expand_path(File.dirname(__FILE__) + "/../config/environment") # We don't want to use the story adapter because it interferes # starts creating transactions that stop multi-process testing (ie # story runner and mongrel) seeing each other's data #require 'spec/rails/story_adapter' # ... # Hack to let us use should have_tag without loading rspec_on_rails module ActionController class TestResponse end end include Test::Unit::Assertions require 'action_controller/assertions' include ActionController::Assertions require 'spec/rails/matchers/assert_select' include Spec::Rails::Matchers It's just waiting to break, I know it. Actually having done this and discussed assert_select with my team, I think I'll write a have_tag matcher using Hpricot. That way I'm not putting the quality of our application in the hands of Rails code. I thought I'd post this anyway for reference. Ashley
_______________________________________________ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users