Any ideas would be much appreciated!
Thanks,
Nicholas
Here is the error trace:
/usr/local/bin/ruby -I.:lib:test
test/functional/cart_items_controller_test.rb -n "/^(test:\ on\
DELETE\ to\ :destroy\ should\ destroy\ record\.\ |test:\ on\ DELETE\
to\ :destroy\ should\ redirect\ to\ "cart_url"\.\ |test:\ on\ DELETE\
to\ :destroy\ should\ respond\ with\ redirect\.\ |test:\ on\ POST\ to\
:create\ with\ nil\ should\ assign\ @cart_item\.\ |test:\ on\ POST\
to\ :create\ with\ nil\ should\ not\ have\ errors\ on\ @cart_item\.\
|test:\ on\ POST\ to\ :create\ with\ nil\ should\ redirect\ to\
"cart_url"\.\ |test:\ on\ POST\ to\ :create\ with\ nil\ should\
respond\ with\ redirect\.\ )$/" | unit_diff -u
/usr/local/lib/ruby/1.8/test/unit/autorunner.rb:138:in `=~': can't
convert Symbol into String (TypeError)
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:138:in
`options'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:26:in
`include?'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:25:in
`include?'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:18:in
`add_suite'
from /Users/nicholas/Sites/shop.david-goliath.ca/web/vendor/
rails/activerecord/lib/../../activesupport/lib/active_support/
inflector.rb:257:in
`find_all'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:18:in
`add_suite'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:
25:in
`collect'
from /usr/local/lib/ruby/1.8/test/unit/collector/objectspace.rb:
23:in
`collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:59
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:198:in
`run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
`run'
from /usr/local/lib/ruby/1.8/test/unit.rb:285
from test/functional/cart_items_controller_test.rb:38
Should and autotest should play together just fine (I've been using
autotest almost since I've started developing it). Maybe if you
upload the test file itself someone here can help with diagnosing the
issue.
Cheers,
Tammer
I also use autotest with Shoulda and haven't had any problems. Any
errors that autotest has thrown for me have been application, not tool
errors. Have you checked line 38 of your cart_items_controller_test.rb
to see if you are trying to compare or match a string to a symbol?
Good luck!
Dan
It appears the issue is with the latest edge Rails (REVISION_8118) and
not anything to do with shoulda or autotest. The error even occurs
running classic unit tests even from the command line.
For those that are interested....
At the command line this fails:
ruby test/functional/world_controller_test.rb -n "/^(test_truth)$/"
See error trace below. Autotest generates this type of command line
after a previous failing test. Anyway a explicit string conversion in
autorunner fixes it until it's fixed in edge.
/usr/local/lib/ruby/1.8/test/unit/autorunner.rb:138:in `=~': can't
convert Symbol into String (TypeError)
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:138:in
`options'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:26:in
`include?'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:25:in
`include?'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:18:in
`add_suite'
from /Users/nicholas/Sites/test_shoulda/vendor/rails/
activerecord/lib/../../activesupport/lib/active_support/inflector.rb:
257:in `find_all'
from /usr/local/lib/ruby/1.8/test/unit/collector.rb:18:in
`add_suite'
from /usr/local/lib/ruby/1.8/test/unit/collector/
objectspace.rb:25:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/collector/
objectspace.rb:23:in `collect'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:59
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:198:in
`run'
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:13:in
`run'
from /usr/local/lib/ruby/1.8/test/unit.rb:285
from test/functional/world_controller_test.rb:7