Class: TestRunner
- Inherits:
-
Object
- Object
- TestRunner
- Defined in:
- lib/test_runner.rb
Instance Attribute Summary collapse
-
#all_engines_param ⇒ Object
readonly
Returns the value of attribute all_engines_param.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Instance Method Summary collapse
-
#initialize(env) ⇒ TestRunner
constructor
A new instance of TestRunner.
- #run_files(tests) ⇒ Object
- #run_method(test) ⇒ Object
Constructor Details
#initialize(env) ⇒ TestRunner
Returns a new instance of TestRunner.
6 7 8 9 |
# File 'lib/test_runner.rb', line 6 def initialize(env) @shell = env[:shell] @all_engines_param = env[:all_engines] end |
Instance Attribute Details
#all_engines_param ⇒ Object (readonly)
Returns the value of attribute all_engines_param.
5 6 7 |
# File 'lib/test_runner.rb', line 5 def all_engines_param @all_engines_param end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
5 6 7 |
# File 'lib/test_runner.rb', line 5 def shell @shell end |
Instance Method Details
#run_files(tests) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/test_runner.rb', line 17 def run_files(tests) begin test_runner = test_collection_runner(tests.working_dir) test_files = tests.relative_paths.join(' ') shell.exec("#{test_runner} #{test_files}", dir: tests.working_dir) rescue TestCollection::MultipleWorkingDirectoriesError => e if run_across_engines? run_across_engines(tests) end end end |
#run_method(test) ⇒ Object
11 12 13 14 15 |
# File 'lib/test_runner.rb', line 11 def run_method(test) test_runner = named_test_runner(test.working_dir) shell.exec("#{test_runner} #{test.relative_path} --name=#{test.test_name}", dir: test.working_dir) end |