README.md in assert-2.12.2 vs README.md in assert-2.13.0

- old
+ new

@@ -214,19 +214,37 @@ ``` Using the CLI: ```sh -$ assert [-s|--seed] 1234 +$ assert [-s|--runner-seed] 1234 ``` Using an ENV var: ```sh $ ASSERT_RUNNER_SEED=1234 assert ``` +### Verbose Output + +By default, Assert shows terse runtime test result information. It provides a setting to turn on/off more verbose information: + +In user/local settings file: + +```ruby +Assert.configure do |config| + config.verbose true +end +``` + +Using the CLI: + +```sh +$ assert [-v|--verbose|--no-verbose] +``` + ### Capture Output By default, Assert shows any output on `$stdout` produced while running a test. It provides a setting to override whether to show this output or to 'capture' it and display it in the test result details: In user/local settings file: @@ -256,11 +274,11 @@ ``` Using the CLI: ```sh -$ assert [-t|--halt-on-fail|--no-halt-on-fail] +$ assert [-h|--halt-on-fail|--no-halt-on-fail] ``` ### Changed Only By default, Assert loads every test file in the path(s) it is given and runs the tests in those files. At times it is convenient to only run certain test files while you are actively developing on a feature. Assert can detect which test files have changes and only load those files: @@ -304,14 +322,14 @@ ```ruby Assert.configure do |config| # run nothing if the `-c` flag is given - config.changed_proc Proc.new{ |test_paths| [] } + config.changed_proc Proc.new{ |config, test_paths| [] } # run all test paths if the `-c` flag is given - config.changed_proc Proc.new{ |test_paths| test_paths } + config.changed_proc Proc.new{ |config, test_paths| test_paths } end ``` ### Pretty Printing values in fail messages @@ -423,11 +441,11 @@ Assert.configure do |config| config.view.styled false end ``` -However, the view hanlder you use is itself configurable. Define you own view handler class and specify it in your user/local settings: +However, the view handler you use is itself configurable. Define you own view handler class and specify it in your user/local settings: ```ruby class MyCustomView < Assert::View::Base # define your view here... end @@ -443,16 +461,17 @@ Each view should implement the callback handler methods to output information at different points during the running of a test suite. Callbacks have access to any view methods and should output information using `puts` and `prints`. See the `DefaultView` template for a usage example. Available callbacks from the runner, and when they are called: -* `before_load`: at the beginning, before the suite is loaded +* `before_load`: at the beginning, before the suite is loaded, the test files are passed as an arg * `after_load`: after the suite is loaded, just before `on_start` * `on_start`: when a loaded test suite starts running * `before_test`: before a test starts running, the test is passed as an arg * `on_result`: when a running tests generates a result, the result is passed as an arg * `after_test`: after a test finishes running, the test is passed as an arg * `on_finish`: when the test suite is finished running +* `on_interrupt`: called when the test suite is interrupted while running Beyond that, each view can do as it sees fit. Initialize how you wish, take whatever settings you'd like, and output results as you see fit, given the available callbacks. ### Using 3rd party views