Add <changed> placeholder
This releases allows the developer to use the placeholder in the retest command. Something like this: retest 'bin/rails <test> && rubocop <changed>
This command will both find the matching test, the changed file and replace the placeholders accordingly.
Retest can be used with <test>
and/or <changed>
retest 'rubocop <changed>'
retest 'bin/rails test <test>'
retest 'bin/rails test <test> && rubocop <changed>'
retest 'bin/rails test <test> && rubocop <test> <changed>'
Rules
If we have a post.rb
and post_test.rb
files. Here are the different scenarios and rules:
A change on post.rb
results in:
<changed> => post.rb
<test> => post_test.rb
A change on post_test.rb
results in:
<changed> => post_test.rb
<test> => post_test.rb