Class: QUnit::Selenium::TestRun
- Inherits:
-
Object
- Object
- QUnit::Selenium::TestRun
- Defined in:
- lib/qunit/selenium/test_run.rb
Defined Under Namespace
Classes: TestResult
Constant Summary collapse
- ID_TESTRESULT =
'qunit-testresult'
- ID_TESTS =
'qunit-tests'
Instance Method Summary collapse
- #completed? ⇒ Boolean
-
#initialize(driver) ⇒ TestRun
constructor
A new instance of TestRun.
- #result ⇒ Object
Constructor Details
#initialize(driver) ⇒ TestRun
Returns a new instance of TestRun.
8 9 10 11 |
# File 'lib/qunit/selenium/test_run.rb', line 8 def initialize(driver) @qunit_testresult = driver[ID_TESTRESULT] @qunit_tests = driver[ID_TESTS] end |
Instance Method Details
#completed? ⇒ Boolean
13 14 15 |
# File 'lib/qunit/selenium/test_run.rb', line 13 def completed? @qunit_testresult.text =~ /Tests completed/ end |
#result ⇒ Object
17 18 19 20 21 |
# File 'lib/qunit/selenium/test_run.rb', line 17 def result assertions = {total: total_assertions, passed: passed_assertions, failed: failed_assertions} tests = {total: total_tests, passed: pass_tests, failed: fail_tests} TestResult.new(tests, assertions, duration) end |