Hi everybody,
I have a few classes containing a few tescase methods.
I would like to create a new class in order to run different tescases
methods of different classes:
file: testcases/myclass1.rb
class Myclass1 < Test::Unit::Testcase
def setup
end
def test01_example
end
def test02_example
end
def test03_example
end
def teardown
end
end
file: testcases/myclass2.rb
class Myclass2 < Test::Unit::Testcase
def setup
end
def test01_example
end
def test02_example
end
def teardown
end
end
file: testsuites/running.rb
class RunningTestCases < Test::Unit::Testcase
def setup
end
def test01_beep
In the example I was inheriting from Test::Unit::Testcase but I’m not
doing that in the real example, I’m inheriting from a superclass that is
inheriting from Test::Unit::Testcase, but I think it doesn’t matter.
Hi everybody,
I have a few classes containing a few tescase methods.
I would like to create a new class in order to run different tescases
methods of different classes:
file: testcases/myclass1.rb
class Myclass1 < Test::Unit::Testcase
it’s class Myclass1 < Test::Unit::TestCase
file: testsuites/running.rb
class RunningTestCases < Test::Unit::Testcase
def setup
end
def test01_beep
Hi Thomas, I knew it.
What I was trying to do is to run not all the test cases in each file.
For example only test03_example() and test01_example() from MyClass1
and test01_example() from MyClass2
it will not help to create only specific test-objects in your script.
At the end of your script ALL test-definitions which where required are
executed - this is the way how test-unit works.
Hi Thomas, I knew it.
What I was trying to do is to run not all the test cases in each file.
For example only test03_example() and test01_example() from MyClass1
and test01_example() from MyClass2
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.