# ZenTest/autotest - Problem with controller modules?

**URL:** <https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583>\
**Category:** Ruby\
**Created:** [October 10, 2006, 2:35am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583 "2006-10-10T02:35:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 10, 2006, 2:35am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/1 "2006-10-10T02:35:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 10, 2006, 3:18am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/2 "2006-10-10T03:18:31Z")

</div>

I also get this notice:

Unable to map class Members::BaseControllerTest to a file

Joe

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 10, 2006, 9:52am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/3 "2006-10-10T09:52:01Z")

</div>

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 ?

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 10, 2006, 10:48am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/4 "2006-10-10T10:48:07Z")

</div>

On 10/9/06, Joe R. MUDCRAP-CE [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 11, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/5 "2006-10-11T20:50:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 11, 2006, 2:30am UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/6 "2006-10-11T02:30:14Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![joe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/b9e5f3/32.png) [@joe](https://www.ruby-forum.com/u/joe)\
**Post date:** [October 11, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/zentest-autotest-problem-with-controller-modules/71583/7 "2006-10-11T20:52:34Z")

</div>

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?
