On Jul 30, 2011, at 3:07 PM, dblock wrote:

> I love conventions. But I am trying to write tests for an API,which
> lives in ... api. I need to be making http requests, so all my tests
> work when put in spec/requests. How can I make that spec/api?
> (Obviously renaming requests into api doesn't bring in the code that
> lets me do GETs).

Take a look at 
https://github.com/rspec/rspec-rails/blob/master/lib/rspec/rails/example.rb.

You can do something similar in spec_helper.rb:

RSpec::configure do |c|
  c.include RSpec::Rails::RequestExampleGroup, :example_group => {
    :file_path => /spec\/api//
  }
end
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to