[rspec-users] How to use request helpers outside of controller specs?

medihack kai.schlamp at googlemail.com
Wed Nov 17 04:06:48 EST 2010

I just solved the problem by including the below code in my acceptance
helper. If you are not Steak then just simply put it in spec helper or
require it from somewhere else. post and xhr methods are now available
in that spec regardless in what spec it is or in what directory you

The code is derived from RSpec::Rails::RequestExampleGroup

RSpec::Core::ExampleGroup.class_eval do
  include ActiveSupport::Concern
  include ActionDispatch::Integration::Runner
  include RSpec::Rails::BrowserSimulators

  def app

  def last_response

More information about the rspec-users mailing list