0

I am using the following command to run a test method from the test file:

./bundle exec ruby -Ilib test_file.rb -n test_method

Can some one please suggest as how to proceed, if I need to run multiple methods on command line.

4

2 回答 2

1

您只需要传递多个-n选项,如下所示:

./bundle exec ruby -Ilib test_file.rb -n test_method -n test_another_method
于 2013-05-07T13:16:50.337 回答
0

I also found a temporary solution for the above problem. I made a call to all the test methods from a single method(I created it). Then used the following command to run it:

./bundle exec ruby -Ilib test_file.rb -n test_method_containing_required_to_run_tests

In the test file:

def test_method_containing_required_to_run_tests
test_method1
test_method2
test_method3
...
end

But when a method fails, the methods after the failing method are not called at all.

于 2013-05-07T13:22:43.647 回答