ZenTest/autotest - Problem with controller modules?

  • Thread starter Joe Ruby MUDCRAP-CE
  • Start date
J

Joe Ruby MUDCRAP-CE

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 @@
-<nil>
+<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
 
J

Joe Ruby MUDCRAP-CE

I also get this notice:

Unable to map class Members::BaseControllerTest to a file


Joe
 
Z

Zouplaz

le 10/10/2006 03:18, Joe Ruby 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 ?
 
R

Rob Sanheim

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 @@
-<nil>
+<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?


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
 
J

Joe Ruby MUDCRAP-CE

Zouplaz said:
le 10/10/2006 03:18, Joe Ruby MUDCRAP-CE nous a dit:

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
 
R

Ryan Davis

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.
 
R

Ryan Davis

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

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,599
Members
45,165
Latest member
JavierBrak
Top