Closed kellyredding closed 10 years ago
@kellyredding - Cool, looks good :boom: I like the debug messages and all the reorgs make sense.
@jcredding check it again - updated the round time to be specific about units outputted. Also, here is some example output in debug mode:
$ assert -d
[DEBUG] CLI init and parse (3.468 ms)
[DEBUG] Apply settings (0.216 ms)
[DEBUG] Require test helper (69.51 ms)
[DEBUG] Require 25 test files (24.37 ms)
[DEBUG] Test files:
[DEBUG] /Users/kelly/projects/redding/assert/test/system/running_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assert_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_block_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_empty_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_equal_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_file_exists_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_includes_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_instance_of_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_kind_of_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_match_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_nil_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_raises_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_respond_to_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions/assert_same_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/assertions_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/context/basic_singleton_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/context/setup_teardown_singleton_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/context/test_should_singleton_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/context_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/macro_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/result_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/runner_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/suite_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/test_tests.rb
[DEBUG] /Users/kelly/projects/redding/assert/test/unit/view_tests.rb
Loaded suite (272 tests)
Running tests in random order, seeded with "1796"
@jcredding here is the output with the -c
flag too:
$ assert -d -c
[DEBUG] CLI init and parse (3.72 ms)
[DEBUG] Apply settings (0.261 ms)
[DEBUG] Load only changed files (9.744 ms)
[DEBUG] `git diff --no-ext-diff --name-only -- test && git ls-files --others --exclude-standard -- test`
[DEBUG] Require test helper (86.508 ms)
[DEBUG] Require 0 test files (0.005 ms)
[DEBUG] Test files:
Loaded suite (0 tests)
@kellyredding - Debug output looks good, good stuff :boom:
This adds enhanced debug output and handling. This involves changes to how the debug config is set, reorganization of debug-related code, and show test suite setup steps w/ benchmarks in debug mode.
First off, this centalizes how "debug mode" is configured. The main bin now requires in the config and defaults the debug mode setting to the ENV var setting. Then everything related to debug output checks against this flag.
Second, this reorganizes the debug handling code all into the assert runner file. All setup steps in the assert runner are benchmarked and outputted if in debug mode.
Closes #136.
@jcredding ready for review.