ZenTest/autotest - Problem with controller modules?

Using rake, my tests all passed. And using autotest they all passed,
until I implemented this test:

def test_vote
count = Item.find(1).vote_count

get :vote, :id=>1, :vote=>5

@item = Item.find(1)

assert_equal @item.vote_count, count+1
assert_equal @item.vote_average, 5
assert_equal @item.vote_total, 1
assert_redirected_to item_url(:action=>:show, :id=>1)

end

Now, autotest displays this:

multiple files matched class ItemsControllerTest
[“test/functional/members/items_controller_test.rb”,
“test/functional/items_controller_test.rb”,
“test/functional/admin/items_controller_test.rb”].
/opt/local/bin/ruby -I.:lib:test -rtest/unit -e
“%w[test/functional/items_controller_test.rb].each { |f| load f }” |
unit_diff -u
Loaded suite -e
Started
…F
Finished in 1.239178 seconds.

  1. Failure:
    test_vote(ItemsControllerTest)
    [./test/functional/items_controller_test.rb:48]:
    — /tmp/diff10537.0 2006-10-09 18:25:13.000000000 -0600
    +++ /tmp/diff10537.1 2006-10-09 18:25:13.000000000 -0600
    @@ -1 +1 @@
    -
    +<5>

4 tests, 6 assertions, 1 failures, 0 errors

Tests under rake still pass. If I comment out the assert_equal lines,
autotest doesn’t display any errors. Any idea what the problem is?

Joe

I also get this notice:

Unable to map class Members::BaseControllerTest to a file

Joe

le 10/10/2006 03:18, Joe R. MUDCRAP-CE nous a dit:

I also get this notice:

Unable to map class Members::BaseControllerTest to a file

Joe

I’m using ZenTest every day but I’m still running the 3.3 - The latest
one (3.4) produces bunches of errors or failure on code that pass
successfully rake test:unit and test:functionnal

May be you should try the old version ?

On 10/9/06, Joe R. MUDCRAP-CE [email protected] wrote:

assert_equal @item.vote_count, count+1

“test/functional/admin/items_controller_test.rb”].
[./test/functional/items_controller_test.rb:48]:

Have you tried running that test in isolation? Via rake
test:functionals? Many times that turns up weird test failures like
that for me…

  • Rob

On Oct 9, 2006, at 5:35 PM, Joe R. MUDCRAP-CE wrote:

Using rake, my tests all passed. And using autotest they all passed,
until I implemented this test: […snip…]

If you use some piece of software and you have a problem with it:
FILE A BUG.

Plain and simple. File a bug. It is the best thing to do. The author
sees it and it is persistent so the author can track it, prioritize,
plan, track, and communicate back to the original finder for more
information. The most important part is that first part: “the author
sees it”. Ruby-talk is a general ruby discussion mailing list. It is
NOT read by everyone and it certainly gives no guarantee that any
problem you find and discuss will ever be resolved.

This mailing list has been averaging just under 1200 email / week for
the last 6 months and it is continuously rising. It just isn’t a good
place for this type of email. Everything you install via ‘sudo gem
install’ or the like is nearly guaranteed to have a bug tracker on
rubyforge. Use it.

Zouplaz wrote:

le 10/10/2006 03:18, Joe R. MUDCRAP-CE nous a dit:

I also get this notice:

Unable to map class Members::BaseControllerTest to a file

Joe

I’m using ZenTest every day but I’m still running the 3.3 - The latest
one (3.4) produces bunches of errors or failure on code that pass
successfully rake test:unit and test:functionnal

May be you should try the old version ?

Yeah, I was using 3.3 – now I’m using 3.4. These messages seem to only
get printed when tests fail.

Joe

On Oct 10, 2006, at 12:50 AM, Zouplaz wrote:

le 10/10/2006 03:18, Joe R. MUDCRAP-CE nous a dit:

I also get this notice:
Unable to map class Members::BaseControllerTest to a file
Joe

I’m using ZenTest every day but I’m still running the 3.3 - The
latest one (3.4) produces bunches of errors or failure on code that
pass successfully rake test:unit and test:functionnal

May be you should try the old version ?

And yet… You haven’t filed a bug or contributed any data to any
extant bugs, have you?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs