sporkrb / spork-testunit

Test::Unit support for Spork
67 stars 27 forks source link

Relative filepaths to tests #20

Open travisjeffery opened 13 years ago

travisjeffery commented 13 years ago

Currently an absolute path is output, i.e.,

testdrb -Itest test/unit/break_test.rb

Loaded suite break_test.rb
Started
........E....................
Finished in 2.139565 seconds.

  1) Error:
test_should_have_site_id_set(BreakTest):
RuntimeError: 
    /test/unit/break_test.rb:22:in `test_should_have_site_id_set'
    activesupport (2.3.14) lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
    activesupport (2.3.14) lib/active_support/testing/setup_and_teardown.rb:62:in `run'

#<DRb::DRbUnknown:0x1e314e8>

but I expect a relative path, i.e.,

ruby -Itest test/unit/break_test.rb

Loaded suite test/unit/break_test
Started
........E.....................
Finished in 1.926428 seconds.

  1) Error:
test_should_have_site_id_set(BreakTest):
RuntimeError: 
    test/unit/break_test.rb:22:in `test_should_have_site_id_set'
    activesupport (2.3.14) lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'
    activesupport (2.3.14) lib/active_support/testing/setup_and_teardown.rb:62:in `run'

30 tests, 72 assertions, 0 failures, 1 errors

Note the test/unit/break_test.rb vs. /test/unit/break_test. I even seen in a test of your's for Spork & Rspec you check to make sure the paths are relative. So would it be possible to have something similar?