Out the box tests failing (user and login engines)


#1

Hi,

I am having some difficulty running the tests that arrive with the
login and user engines using the following command :

rake test_plugins

I am running rails 1.0 with ruby 1.8.4

Any ideas or help would be appreciated.

Here is the output of the failures :

(in /Users/asachs/hope/src/hope)
/usr/local/bin/ruby -Ilib:test “/usr/local/lib/ruby/gems/1.8/gems/
rake-0.7.0/lib/rake/rake_test_loader.rb” “vendor/plugins/engines/test/
action_view_extensions_test.rb” “vendor/plugins/engines/test/
ruby_extensions_test.rb” “vendor/plugins/login_engine/test/functional/
user_controller_test.rb” “vendor/plugins/login_engine/test/unit/
user_test.rb” “vendor/plugins/user_engine/test/functional/
permission_controller_test.rb” “vendor/plugins/user_engine/test/
functional/role_controller_test.rb” “vendor/plugins/user_engine/test/
functional/user_controller_test.rb” “vendor/plugins/user_engine/test/
unit/permission_test.rb” “vendor/plugins/user_engine/test/unit/
role_test.rb” “vendor/plugins/user_engine/test/unit/user_test.rb”
Loaded suite /usr/local/lib/ruby/gems/1.8/gems/rake-0.7.0/lib/rake/
rake_test_loader
Started
…EEFFEEFFEEFFEEFFFF…EFE.EFF.FFE…E.F…E…
Finished in 3.155841 seconds.

  1. Error:
    test_admin_authorized(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:71:in `test_admin_authorized’

  2. Error:
    test_change_password_for_user_with_bad_email(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:220:in
    `test_change_password_for_user_with_bad_email’

  3. Failure:
    test_change_password_with_bad_email(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:399:intest_change_password_with_bad_email’]:
    <:user> is not in the session <#<ActionController::TestSession:0x57f8c8
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  4. Failure:
    test_change_short_password(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:364:intest_change_short_password’]:
    <:user> is not in the session <#<ActionController::TestSession:0x24ebc74
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  5. Error:
    test_change_short_password_for_user(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:187:in `test_change_short_password_for_user’

  6. Error:
    test_change_short_password_for_user_without_email(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:204:in
    `test_change_short_password_for_user_without_email’

  7. Failure:
    test_change_short_password_without_email(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:380:intest_change_short_password_without_email’]:
    <:user> is not in the session <#<ActionController::TestSession:0x24b5cdc
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  8. Failure:
    test_change_valid_password(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:314:intest_change_valid_password’]:
    <:user> is not in the session <#<ActionController::TestSession:0x247bc58
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  9. Error:
    test_change_valid_password_for_user(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:152:in `test_change_valid_password_for_user’

  10. Error:
    test_change_valid_password_for_user_without_email(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:173:in
    `test_change_valid_password_for_user_without_email’

  11. Failure:
    test_change_valid_password_without_email(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:342:intest_change_valid_password_without_email’]:
    <:user> is not in the session <#<ActionController::TestSession:0x24413c8
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  12. Failure:
    test_delete(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:228:intest_delete’]:
    <:user> is not in the session <#<ActionController::TestSession:0x2418cac
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordalongtestlogindeletebob1",
    :user=>nil,
    “flash”=>{}}>>

  13. Error:
    test_delete_user_no_delay(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:128:in `test_delete_user_no_delay’

  14. Error:
    test_delete_user_with_delay(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:137:in `test_delete_user_with_delay’

  15. Failure:
    test_delete_without_email(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:274:intest_delete_without_email’]:
    <:user> is not in the session <#<ActionController::TestSession:0x23f070c
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordalongtestlogindeletebob1",
    :user=>nil,
    “flash”=>{}}>>

  16. Failure:
    test_edit(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:205:intest_edit’]:
    <:user> is not in the session <#<ActionController::TestSession:0x23b623c
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  17. Failure:
    test_forgot_password(UserControllerTest)
    [./vendor/plugins/login_engine/test/functional/
    user_controller_test.rb:454:in do_forgot_password' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:431:intest_forgot_password’]:
    <1> expected but was
    <0>.

  18. Failure:
    test_forgot_password_without_email_and_logged_in(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:505:intest_forgot_password_without_email_and_logged_in’]:
    <:user> is not in the session <#<ActionController::TestSession:0x237e210
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  19. Error:
    test_login(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/functional/ user_controller_test.rb:45:intest_login’

  20. Failure:
    test_login_logoff(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:23:in assert_session_has' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:59:intest_login_logoff’]:
    <:user> is not in the session <#<ActionController::TestSession:0x22f3bec
    @attributes=
    {“prev_uri”=>"/user/login?user=passwordatestloginbob",
    :user=>nil,
    “flash”=>{}}>>

  21. Error:
    test_new_user(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:85:in `test_new_user’

  22. Error:
    test_show_user(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:105:in `test_show_user’

  23. Failure:
    test_signup(UserControllerTest) [./vendor/plugins/login_engine/test/
    functional/user_controller_test.rb:80]:
    <5> expected but was
    <3>.

  24. Failure:
    test_signup_bad_details(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:116:in assert_template_has' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/deprecated_assertions.rb:194:infind_record_in_template’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:176:in
    assert_invalid_column_on_record' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:171:intest_signup_bad_details’]:
    <“user”> is not a template object

  25. Failure:
    test_signup_bad_password(UserControllerTest)
    [/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:116:in assert_template_has' /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/ action_controller/deprecated_assertions.rb:194:infind_record_in_template’
    /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.11.2/lib/
    action_controller/deprecated_assertions.rb:176:in
    assert_invalid_column_on_record' ./vendor/plugins/login_engine/test/functional/ user_controller_test.rb:128:intest_signup_bad_password’]:
    <“user”> is not a template object

  26. Failure:
    test_signup_without_email(UserControllerTest) [./vendor/plugins/
    login_engine/test/functional/user_controller_test.rb:154]:
    expected to be =~
    </Signup successful/>.

  27. Error:
    test_unauthorized_access(UserControllerTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.[]
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:285:in users' ./vendor/plugins/user_engine/test/unit/../test_helper.rb:62:inlogin’
    ./vendor/plugins/user_engine/test/functional/
    user_controller_test.rb:52:in `test_unauthorized_access’

  28. Error:
    test_auth(UserTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.find
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:287:in users' ./vendor/plugins/login_engine/test/unit/user_test.rb:13:intest_auth’

  29. Failure:
    test_collision(UserTest) [./vendor/plugins/login_engine/test/unit/
    user_test.rb:82]:
    is not true.

  30. Error:
    test_passwordchange(UserTest):
    NoMethodError: You have a nil object when you didn’t expect it!
    You might have expected an instance of Array.
    The error occured while evaluating nil.find
    /Users/asachs/hope/src/hope/config/…/vendor/plugins/engines/lib/
    engines/testing_extensions.rb:287:in users' ./vendor/plugins/login_engine/test/unit/user_test.rb:20:intest_passwordchange’

69 tests, 220 assertions, 16 failures, 14 errors
rake aborted!
Command failed with status (1): [/usr/local/bin/ruby -Ilib:test "/usr/
local…]

Regards
Andre


Andre Sachs
IT Architect, Clue Technologies PTY (LTD)
email: removed_email_address@domain.invalid