Hi,
I have a test class, TestClass0, with a few test methods. I specify some
hard coded values in the setup method:
test_class0.rb
require ‘test/unit’
class TestClass0 < Test::Unit::TestCase
def setup
@server_url = “http://localhost:8080”
end
def test_something_with_watir
# …
end
def test_something_else_with_watir
# …
end
end
test_class1.rb
require ‘test/test_class0’
class TestClass1 < TestClass0
def setup
@server_url = “http://my_test_server:8080”
end
end
I want to run the exact same tests with slightly different values,
therefor I extend the class, override setup with the different values.
The problem is the line: “require ‘test/test_class0’”
It first runs all the tests specified in TestClass0, with the
@server_url specified in TestClass0. When they are completed the same
tests are run with the server url specified in TestClass1. How could i
skip the first tests, only run the tests with the @server_url from
TestClass1?