How to run a single test with Test::Unit?

F

Fernando Perez

Hi,

I have tests written as:

test "some test" do
...
end


But when I want to run a single test it doesn't work like before:

$ ruby test/functional/some_controller_test.rb -n some_test

Iget 0 test, 0 assertions...

I also rewrote the test to :

def some_test
...
end


And still no luck. Has anything changed from the various tutorials found
on the internet? Also guides.rubyonrails.org has nothing about that.
 
J

Jeremy Kemper

Hi,

I have tests written as:

test "some test" do
=A0...
end


But when I want to run a single test it doesn't work like before:

$ ruby test/functional/some_controller_test.rb -n some_test

Iget 0 test, 0 assertions...

I also rewrote the test to :

def some_test
=A0...
end


And still no luck. Has anything changed from the various tutorials found
on the internet? Also guides.rubyonrails.org has nothing about that.


test "some test" do ...

becomes

def test_some_test ...

so use -n test_some_test

jeremy
 
F

Fernando Perez

so use -n test_some_test
Unfortunately it doesn't work :(

Damn! I didn't spot the test_ my eyes are getting tired! Enough work for
today.

Thanks and have a nice weekend.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top