From a4ae62511a7a6624a26e13460d887170f087052c Mon Sep 17 00:00:00 2001 From: Marcelo Jacobus Date: Fri, 16 Mar 2018 15:35:22 +0100 Subject: [PATCH] Improve readme --- README.md | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d56fcb4..e4bc463 100644 --- a/README.md +++ b/README.md @@ -75,21 +75,11 @@ module My @suffix = suffix end - def accept?(config) - config.file_path.end_with?(@suffix) - end - + # return nil if you do not want to deal with it def test_command(config) - cmd = ["/usr/bin/my_test] - - if config.all? - return cmd.join(' ') + if config.file_path.end_with?(@suffix) + return "./bin/test #{config.file_path}" end - - cmd << "--file=#{config.file_path}"" - cmd << "--line=#{config.line}" if config.line - - cmd.join(' ') end end end @@ -101,6 +91,20 @@ Now you can run: bundle exec run_test some/file_spec.custom ``` +## Running the last test + +Either run a file that does not get caught by any adapter + +```bash +bundle exec run_test some/file_spec.unkown # run last test +``` + +Or + +```bash +bundle exec run_test --last +``` + ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.