[rspec-users] Configuring RSpec for Integration Test

Sarah Allen lists at ruby-forum.com
Fri Jan 7 09:41:23 EST 2011

Getting back to this after the holidays...

David Chelimsky wrote in post #969342:
> If you need to use spec/integration instead, then you'll need to tell
> RSpec to include RSpec::Rails::RequestExampleGroup in those examples.
> You can do that on a per group basis, like this:
> describe "something" do
>   include RSpec::Rails::RequestExampleGroup
>   ...
> end
> Or globally like this:
> RSpec.configure do |config|
>   config.include RSpec::Rails::RequestExampleGroup,
>                  :example_group => {
>        :file_path => /spec\/integration/
>                  }
> end

I tried the approach with an include and it worked fine, which I pushed 
to a branch here: 

Also, just changing the directory name to "requests" worked fine too: 

I couldn't find anywhere this was documented. Did I miss a page?  If so, 
maybe we can write a blog post post and improve the SEO on this basic 
bit of info.  Or point to where it should be documented and maybe we can 
help with that.


Posted via http://www.ruby-forum.com/.

More information about the rspec-users mailing list