Hi,
My tests are failing, and I’ve double checked the code archive and I can’t find the fault. Please help.
I’m on Chapter 9 page 347 and I’m supposed to run the final test and it should work, but I went wrong somewhere. This is the error the console gives me…
...........................F....
Finished in 1.484 seconds.
1) Failure:
test_should_show_user(UsersControllerTest) [/test/functional/users_controller_test.rb:6]:
Expected response to be a <:succes>, but was <200>
32 tests, 71 assertions, 1 failures, 0 errors
D:/InstantRails/ruby/bin/ruby.exe -I"lib;test" "D:/InstantRails/ruby/lib/ruby/ge
ms/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb"
Errors running test:functionals!
This is what my users_controller_test looks like…(okey, it’s only the one that failed, not the whole file)
class UsersControllerTest < ActionController::TestCase
def test_should_show_user
get :show, :id => users(:mj)
assert_response :succes
assert_template 'show'
assert_equal users(:mj), assigns(:user)
end
This is my users.yml file…
mj:
login: mj
password: sekrit
name: MJ Meyer
email: "This is blank to avoid spam from forums as I used my actual email addy"
john:
login: john
password: gh752px
name: John Doe
email: john@doe.com
I’m not sure what other files I could/should provide. Please advise if there are any other files wherein the problem could be occurring.
I also checked my controller files as well as my show files to make sure the code is correct. I could not find any differences.
Please help!