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.
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.
您只需要传递多个-n
选项,如下所示:
./bundle exec ruby -Ilib test_file.rb -n test_method -n test_another_method
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.