#67 √ hold
eksatx

Test failure with test_should_require_login(MonitorshipsControllerTest)

Reported by eksatx | June 10th, 2009 @ 10:57 PM

I'm using Rails 2.3.2 and the rails template installation:

rails your_app_name -m http://www.communityengine.org/install_template.rb

Everything works fine as far as I can tell, but it fails this test:

1) Error: test_should_require_login(MonitorshipsControllerTest):
RuntimeError: Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object_id

vendor/plugins/community_engine/app/controllers/monitorships_controller.rb:5:in `create'
haml (2.0.9) lib/sass/plugin/rails.rb:19:in `process'
/vendor/plugins/community_engine/test/functional/monitorships_controller_test.rb:13:in `test_should_require_login'

486 tests, 827 assertions, 0 failures, 1 errors
rake aborted!
Command failed with status (1): [/usr/bin/ruby1.8 -I"lib:lib" "/usr/lib/rub...]

I see that somebody else has reported this on the Google Group. I have reproduced it on two machines (both running Ubuntu at different versions).

Comments and changes to this ticket

  • bruno

    bruno June 22nd, 2009 @ 12:45 PM

    • → State changed from “new” to “invalid”

    Hi,
    I think this has been fixed in edge. Please try it there before reporting the bug.
    Thanks,
    Bruno

  • eksatx

    eksatx June 28th, 2009 @ 02:06 PM

    This problem still happens with the latest commit on edge (4e5531f).

  • bruno

    bruno June 29th, 2009 @ 08:05 PM

    This test passes for me with a fresh install. What platform are you on? Anything special about your setup?

  • eksatx

    eksatx June 29th, 2009 @ 11:31 PM

    I have been able to reproduce this error on three different machines, and it appears that at least one other person on the Google group has seen it too. There must be something we all have in common (except you) that causes this error.

    My main dev machine is Ubuntu 9.04.

    ruby 1.8.7 (2008-08-11 patchlevel 72) [i486-linux]

    Local gems:

    actionmailer (2.3.2)
    actionpack (2.3.2)
    activerecord (2.3.2)
    activeresource (2.3.2)
    activesupport (2.3.2)
    aws-s3 (0.6.2)
    builder (2.1.2)
    desert (0.5.0)
    haml (2.0.9)
    hpricot (0.8.1)
    htmlentities (4.0.0)
    mime-types (1.16)
    mysql (2.7)
    rails (2.3.2)
    rake (0.8.7)
    rmagick (2.9.2)
    sqlite3-ruby (1.2.4)
    xml-simple (1.0.12)

    Anything else relevant that would help?

  • Manuel Morales

    Manuel Morales July 29th, 2009 @ 08:49 AM

    Same problem here. Let me know if I can help.

    $ uname -a Linux xps 2.6.28-13-generic #45-Ubuntu SMP Tue Jun 30 19:49:51 UTC 2009 i686 GNU/Linux

    $ gem list

    LOCAL GEMS

    actionmailer (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    actionpack (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    active_youtube (1.0.0)
    activerecord (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    activeresource (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    activesupport (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    acts_as_ferret (0.4.4)
    arrayfields (4.7.2)
    aws-s3 (0.6.2)
    browsercms (3.0.0)
    builder (2.1.2)
    capistrano (2.5.8)
    cgi_multipart_eof_fix (2.5.0)
    cheat (1.2.1)
    columnize (0.3.0)
    cucumber (0.3.11, 0.2.2)
    daemons (1.0.10)
    deplate (0.8.5, 0.8.4)
    desert (0.5.0)
    diff-lcs (1.1.2)
    fastthread (1.0.5, 1.0.1)
    fattr (1.0.3)
    feed-normalizer (1.5.1)
    ferret (0.11.6)
    flickr (1.0.2)
    flickraw (0.5.1)
    francois-piston (2.0.0)
    gdata (1.0.1)
    gem_plugin (0.2.3)
    gosu (0.7.13.2)
    haml (2.0.9)
    highline (1.5.1)
    hoe (2.3.2, 1.11.0, 1.8.3, 1.8.0)
    hpricot (0.7)
    htmlentities (4.0.0)
    httpclient (2.1.4, 2.1.3.1, 2.1.2)
    icalendar (1.1.0)
    id3lib-ruby (0.5.0)
    jordi-xml-object (0.9.9)
    json (1.1.4)
    linecache (0.43)
    log4r (1.0.5)
    main (2.8.3)
    mechanize (0.9.2, 0.9.0)
    mime-types (1.16)
    mislav-will_paginate (2.3.10)
    mocha (0.9.7)
    mongrel (1.1.5)
    net-scp (1.0.2)
    net-sftp (2.0.2)
    net-ssh (2.0.11)
    net-ssh-gateway (1.0.1)
    nokogiri (1.2.3, 1.1.1)
    open4 (0.9.6)
    piston (1.4.0)
    polyglot (0.2.5)
    rack (0.9.1)
    radiant (0.7.1)
    railroad (0.5.0)
    rails (2.3.2, 2.2.2, 2.1.2, 2.1.1, 2.0.2)
    rake (0.8.7, 0.8.4, 0.8.3)
    rcov (0.8.1.2.0)
    rdoc (2.4.3, 2.4.2, 2.3.0, 2.2.1)
    RedCloth (4.2.2)
    rmagick (2.9.2)
    rspec (1.2.8, 1.2.2, 1.1.12, 1.1.11)
    rspec-rails (1.2.7.1, 1.2.2, 1.1.12, 1.1.11)
    rubigen (1.5.2)
    ruby-debug (0.10.3)
    ruby-debug-base (0.10.3)
    ruby-openid (2.1.7)
    rubyforge (1.0.3, 1.0.2, 1.0.0)
    rubygems-update (1.3.1)
    rufus-scheduler (2.0.1)
    rush (0.5.1, 0.5)
    session (2.4.0)
    simple-rss (1.2)
    soap4r (1.5.8)
    term-ansicolor (1.0.3)
    thoughtbot-factory_girl (1.2.2)
    tidy (1.1.2)
    treetop (1.2.5)
    unicode (0.1)
    vim-ruby (2007.05.07)
    wirble (0.1.2)
    xml-simple (1.0.12)
    ZenTest (4.0.0, 3.11.1, 3.10.0)

  • Stephen Boisvert
  • bruno

    bruno August 5th, 2009 @ 03:08 PM

    • → State changed from “invalid” to “hold”

    Are you guys all on Ubuntu? I can't fathom what it might be about that platform that's causing this to fail, but I get it passing on my machine (OS X).

  • hamann_paul (at yahoo)

    hamann_paul (at yahoo) September 5th, 2009 @ 11:19 AM

    I'm getting this error on Ubuntu Jaunty as well.

    Is there a workaround?

  • bruno

    bruno September 9th, 2009 @ 11:31 AM

    Just a wild guess, but does this commit fix it for you guys (http://github.com/bborn/communityengine/commit/ad2a7f27565484c254f2.... I'm still getting this as passing on my box.
    Thanks,
    Bruno

  • bruno

    bruno September 11th, 2009 @ 11:33 AM

    • → State changed from “hold” to “resolved”

    (from [5efd1d8e6fc904cbc9845df71136b15a13d2e8e6]) fix weird monitorships controller test failure [#67 state:resolved] Please enter the commit message for your changes. Lines starting http://github.com/bborn/communityengine/commit/5efd1d8e6fc904cbc984...

  • bruno

    bruno September 11th, 2009 @ 11:35 AM

    • → State changed from “resolved” to “hold”

    Hmm, after upgrading to Snow Leopard, I finally got this error on my machine. No clue why, but I think it has something to do with the implementation of xhr requests in Test::Unit. I can confirm that this works in a new CE app, but couldn't make the js test work and didn't want to waste a lot of time on it. So now the test just tests the normal request case, and not the xhr request.
    Thanks!
    Bruno

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

CommunityEngine is a free, open-source social network plugin for Ruby on Rails applications. Drop it into your new or existing application, and you’ll instantly have all the features of a basic community site.

People watching this ticket

Tags

You can update this ticket by sending an email to from your email client. (help)