Class: JmlTestRunner::Runner
- Inherits:
-
Object
- Object
- JmlTestRunner::Runner
- Defined in:
- lib/jml_test_runner/runner.rb
Instance Attribute Summary collapse
-
#dir ⇒ Object
readonly
Returns the value of attribute dir.
-
#exes ⇒ Object
readonly
Returns the value of attribute exes.
-
#suites_run ⇒ Object
readonly
Returns the value of attribute suites_run.
Instance Method Summary collapse
-
#initialize(test_dir) ⇒ Runner
constructor
A new instance of Runner.
- #run(suite_name = nil) ⇒ Object
Constructor Details
#initialize(test_dir) ⇒ Runner
Returns a new instance of Runner.
8 9 10 11 12 |
# File 'lib/jml_test_runner/runner.rb', line 8 def initialize(test_dir) @dir = File.(test_dir) @exes = Dir["#{@dir}/**/*"].select { |f| f =~ /(.+)_tests?$/ } @suites_run = [] end |
Instance Attribute Details
#dir ⇒ Object (readonly)
Returns the value of attribute dir.
7 8 9 |
# File 'lib/jml_test_runner/runner.rb', line 7 def dir @dir end |
#exes ⇒ Object (readonly)
Returns the value of attribute exes.
7 8 9 |
# File 'lib/jml_test_runner/runner.rb', line 7 def exes @exes end |
#suites_run ⇒ Object (readonly)
Returns the value of attribute suites_run.
7 8 9 |
# File 'lib/jml_test_runner/runner.rb', line 7 def suites_run @suites_run end |
Instance Method Details
#run(suite_name = nil) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/jml_test_runner/runner.rb', line 14 def run(suite_name = nil) _check_for_suite(suite_name) if suite_name _do_run(suite_name) @formatter = JmlTestRunner::Formatters::Basic.new(self) @formatter.print_formatted_output end |