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
I think much of my problem was not quite understanding how stories were supposed to work, (notably I was trying to redefine "When I call the api" in two different scenarios, but only one of these gets used in both cases) But I think I've got an agreeable end-product. http://pastie.org/221205 Thanks once more. MatthewRudy -- Posted via http://www.ruby-forum.com/. _______________________________________________ rspec-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/rspec-users
