Class: PrettyTest::Runner
- Inherits:
-
MiniTest::Unit
- Object
- MiniTest::Unit
- PrettyTest::Runner
- Defined in:
- lib/pretty_test/runner.rb
Constant Summary collapse
- SKIP_FORMAT =
"\e[33m[SKIPPED] %s: %s\e[0m\n%s\n%s"- FAILURE_FORMAT =
"\e[31m[FAILURE] %s: %s\e[0m\n\e[31m%s: %s\e[0m\n%s"- ERROR_FORMAT =
"\e[31m[ERROR] %s: %s\e[0m\n\e[31m%s: %s\e[0m\n%s"- STATUS_FORMAT =
"\e[2K\r\e[?7l\e[37m(%.1fs) \e[32m%d/%d tests\e[37m, \e[36m%d assertions\e[37m, \e[31m%d errors\e[37m, \e[31m%d failures\e[37m, \e[33m%d skips \e[37m%s\e[?7h\e[0m"
Instance Attribute Summary collapse
-
#assertion_count ⇒ Object
Returns the value of attribute assertion_count.
-
#progress ⇒ Object
Returns the value of attribute progress.
-
#started_at ⇒ Object
Returns the value of attribute started_at.
-
#suite_name ⇒ Object
Returns the value of attribute suite_name.
-
#test_count ⇒ Object
Returns the value of attribute test_count.
-
#test_name ⇒ Object
Returns the value of attribute test_name.
Instance Method Summary collapse
Instance Attribute Details
#assertion_count ⇒ Object
Returns the value of attribute assertion_count.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def assertion_count @assertion_count end |
#progress ⇒ Object
Returns the value of attribute progress.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def progress @progress end |
#started_at ⇒ Object
Returns the value of attribute started_at.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def started_at @started_at end |
#suite_name ⇒ Object
Returns the value of attribute suite_name.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def suite_name @suite_name end |
#test_count ⇒ Object
Returns the value of attribute test_count.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def test_count @test_count end |
#test_name ⇒ Object
Returns the value of attribute test_name.
10 11 12 |
# File 'lib/pretty_test/runner.rb', line 10 def test_name @test_name end |
Instance Method Details
#_run_anything(type) ⇒ Object
12 13 14 15 |
# File 'lib/pretty_test/runner.rb', line 12 def _run_anything(type) suites = TestCase.send("#{type}_suites") _run_suites(suites, type) end |
#_run_suite(suite, type) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/pretty_test/runner.rb', line 24 def _run_suite(suite, type) before_suite(suite) tests = suite.send("#{type}_methods") tests.each do |test| run_test(suite, test) end ensure after_suite(suite, type) end |
#_run_suites(suites, type) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/pretty_test/runner.rb', line 17 def _run_suites(suites, type) before_suites(suites, type) super ensure after_suites(suites, type) end |