Having autospec run tests?

Hi,

On one project, I have cucumber features and test/unit (well, i guess
activesupport::testcase) tests.

I really like how:
AUTOFEATURE=true autospec
works on my projects that use rspec and cucumber.

Can I get that same behavior, but with my tests in the tests directory?

Joe

On Wed, Jun 3, 2009 at 1:01 PM, Joe Van D. [email protected] wrote:

I really like how:
AUTOFEATURE=true autospec
works on my projects that use rspec and cucumber.

Can I get that same behavior, but with my tests in the tests directory?

Sure. In fact it should work just fine out of the box: do the same
thing, but with ‘autotest’ instead of ‘autospec’. (The check for that
environment variable isn’t in the autospec script, it’s in the
discovery file that Cucumber sets up.)


Have Fun,
Steve E. ([email protected])
ESCAPE POD - The Science Fiction Podcast Magazine
http://www.escapepod.org

autotest doesn’t seem to work for me, for some reason:

that file doesn’t get loaded when autospec runs.

/home/joe/projects/zoolah/vendor/plugins/mocha/lib/mocha/integration/test_unit.rb:17:in
remove_method': methodrun’ not defined in Test::Unit::TestCase
(NameError)
from
/home/joe/projects/zoolah/vendor/plugins/mocha/lib/mocha/integration/test_unit.rb:17
from
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
gem_original_require' from /usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inpolyglot_original_require’
from
/home/joe/projects/zoolah/vendor/gems/polyglot-0.2.5/lib/polyglot.rb:54:in
require' from /home/joe/projects/zoolah/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:inrequire’
from
/home/joe/projects/zoolah/vendor/rails/activesupport/lib/active_support/dependencies.rb:265:in
require_or_load' from /home/joe/projects/zoolah/vendor/rails/activesupport/lib/active_support/dependencies.rb:425:inload_missing_constant’
from
/home/joe/projects/zoolah/vendor/rails/activesupport/lib/active_support/dependencies.rb:80:in
const_missing' ... 11 levels... from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:216:inrun’
from /usr/local/lib/ruby/1.8/test/unit/autorunner.rb:12:in `run’
from /usr/local/lib/ruby/1.8/test/unit.rb:278
from -e:1