[rspec-users] Rspec-Rails setting a header in stories?

Matthew Rudy Jacobs lists at ruby-forum.com
Tue Jun 24 11:33:05 EDT 2008

David Chelimsky wrote:
> On Jun 24, 2008, at 10:22 AM, Matthew Rudy Jacobs wrote:
>> Hi there,
>> For my api controllers I need the following;
>> request.ssl? == true
>> and
>> an api key "request.env['HTTP_OUR_API_KEY']"
>> In my spec/controllers I just stub out the required code
>> but in stories I don't want any stubs.
> Stories wrap Rails IntegrationTest, not Rails FunctionalTest, so what
> you have access to is different. The methods look the same, but they
> actually go through routing and work a little differently.
> Check out: 
> http://api.rubyonrails.org/classes/ActionController/Integration/Session.html
> Cheers,
> David
Oh really.
Cheers David...

so the "3rd argument" solution should be working.
Will have to take a closer look...

Thanks again

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

More information about the rspec-users mailing list