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


#1

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.


#2

On Fri, Apr 17, 2009 at 11:45 AM, Fernando P. removed_email_address@domain.invalid
wrote:

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


#3

test “some test” do …

becomes

def test_some_test …

so use -n test_some_test

jeremy

Unfortunately it doesn’t work :frowning:


#4

so use -n test_some_test

jeremy

Unfortunately it doesn’t work :frowning:

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

Thanks and have a nice weekend.