[rspec-users] Spec'ing the result of rescue_from
dchelimsky at gmail.com
Fri Jun 26 10:03:36 EDT 2009
On Tue, Jun 23, 2009 at 1:27 PM, PJ Kelly<pj at crushlovely.com> wrote:
> Hi David, thanks for the speedy response yesterday. Much appreciated.
> On Jun 22, 3:43 pm, David Chelimsky <dchelim... at gmail.com> wrote:
>> What's the failure message?
> 'MembersController GET process_step_2 should redirect to step_2'
> expected redirect to "http://test.host/application/step_2", got no
> I did some more digging, and found a couple things. When I try this
> in the browser (by visiting /application/step_2/process) and look at
> the development log, the request is actually being made to
> Processing ApplicationController#index (for 127.0.0.1 at 2009-06-23
> 11:08:18) [GET]
> Redirected to http://byassociation.local/application/step_2
> However when the specs are run, the test log shows:
> Processing MembersController#process_step_2 (for 18.104.22.168 at
> 2009-06-23 11:19:50) [GET]
> I guess the question then, is that if this is how things are handled
> when using rescue_from, how do I spec out that users are being
> redirected to the right location? Do you think the inconsistency
> between the development test logs needs to be brought up with Rails
You've got a route named application :) I'm sure that's where the
confusion lies, though I'm not convinced of where the problem lies.
What are the controllers and models actually called? What version of
rails, rspec, etc?
> Thanks in advance!
> Best, PJ
> rspec-users mailing list
> rspec-users at rubyforge.org
More information about the rspec-users