Test weirdness

Hi gurus,

I have this in routes.rb:

map.root :controller => ‘items’

This in my method controller

redirect_to_root( msg = ‘Oops!’ )

And this in my application controller

def redirect_to_root( msg = nil )
flash[ :notice ] = msg if msg
redirect_to root_path

With this in my functionals test for the method,

assert_redirected_to root_path

I get the following error on rake test:functionals

  1. Failure:
    test_should_create_donor(DonorsControllerTest) [/test/functional/
    Expected response to be a redirect to http://test.host/ but was a
    redirect to http://test.host/items.

Any idea how to fix this? I’ve spent hours trying to eliminate this

Many TIA,

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs