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
end
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/
donors_controller_test.rb:29]:
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
error...
Many TIA,
Craig