How to run a specific TestUnit if the file contain two

  • Thread starter Iñaki Baz Castillo
  • Start date
I

Iñaki Baz Castillo

Hi, I've a file with two classes:

class Test1 < Test::Unit::TestCase
def test_aaa
...
end
end

class Test2 < Test::Unit::TestCase
def test_aaa
...
end
end


How could I run just the "test_aaa" of the Test1 class?
If I run:
./my_tests.rb --name test_aaa
then just the latest function is runned.

Thanks.

=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
 
I

Iñaki Baz Castillo

El Lunes, 16 de Noviembre de 2009, I=C3=B1aki Baz Castillo escribi=C3=B3:
Hi, I've a file with two classes:
=20
class Test1 < Test::Unit::TestCase
def test_aaa
...
end
end
=20
class Test2 < Test::Unit::TestCase
def test_aaa
...
end
end
=20
=20
How could I run just the "test_aaa" of the Test1 class?
If I run:
./my_tests.rb --name test_aaa
then just the latest function is runned.

Sorry, the fact is that both functions are runned.


=2D-=20
I=C3=B1aki Baz Castillo <[email protected]>
 
A

Allen Lee

I also encounter this kind of problem. It seems that Ruby does support sort
of meta-data applied to methods like attributes applied to methods in .NET,
which allows us to distinguish two methods in our judge.

allenlooplee
 

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,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top