So I have my admin controllers set up to inherit from an
AdminAreaController for the purpose of authentication. The setup is
much like Justin F. describes at:
http://justinfrench.com/index.php?id=122
Everything works great from the browser, but I’m running into this bug
in my functional tests:
test_artist_list(Admin::ArtistControllerTest)
[./test/functional/admin/artist_controller_test.rb:17]:
Expected response to be a <:success>, but was <302>
The test in question simply does:
get :index
assert_response :success
Like I said, it works fine in a browser (no redirect), and it works
fine if I change the inheritance of ArtistController to inherit from
ActiveController again instaed of AdminAreaController.
Also at the end of the tests I get this:
Unable to map class Admin::ArtistControllerTest to a file
Which is pretty cryptic as well, since that is the file that creates
the failure!
Something screwy is going on. I really don’t want to give up my
controller inheritance, but if I can’t get functional tests working I
may have to. Any ideas?