minitest / minitest-sprint

39 stars 1 forks source link

Allow rake task name to be passed as an argument and repeated back in failure list #4

Closed adam12 closed 1 month ago

adam12 commented 2 months ago

This will allow the failure to be run using the same test task as the original failure.

$ BAD=true rake test A="--rake foo"
Run options: --rake foo --seed 30155

# Running:

.ESF

Finished in 0.000332s, 12048.1929 runs/s, 6024.0965 assertions/s.

  1) Error:
TestMinitestSprint#test_error:
RuntimeError: nope
    test/test_minitest_sprint.rb:19:in `test_error'

  2) Failure:
TestMinitestSprint#test_fail [test/test_minitest_sprint.rb:15]:
write tests or I will kneecap you

4 runs, 2 assertions, 1 failures, 1 errors, 1 skips

You have skipped tests. Run with --verbose for details.

Happy Happy Sprint List:

  rake foo N=TestMinitestSprint#test_error
  rake foo N=TestMinitestSprint#test_fail

rake aborted!
Command failed with status (1): [/Users/adam/.local/share/mise/installs/ruby/3.3.3/bin/ruby -I:lib:test:. -w -e 'require "minitest/autorun"; require "test/test_minitest_sprint.rb"' -- --rake foo]

Tasks: TOP => test
(See full trace by running task with --trace)
zenspider commented 1 month ago

this is done... and shipped