Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #13 from lmarburger/guard-cucumber
--- Read and save failed features if `#run_all` fails. Heres the workflow Im going for: 1. Save Feature1 2. Feature1 -> fail 3. Save a file somewhere in the codebase 4. Feature1 -> pass 5. All features -> Feature2 fail 6. Save a file somewhere in the codebase 7. Feature2 -> pass 8. All features -> pass From what I can tell, theres no way to tell guard-cucumber to rerun the saved failed features without calling `#run_on_change`. Heres my Guardfile: ```ruby guard cucumber, :cli => --no-profile --drb --color --strict --format progress --format rerun --out rerun.txt, :all_on_start => false do watch(%r{^features/.+\.feature$}) watch(%r{^features/support/.+$}) { features } watch(%r{^app/assets/.+$}) { features } watch(%r{^features/step_definitions/(.+)_steps\.rb$}) do |m| Dir[File.join("**/#{m[1]}.feature")][0] || features end # Rerun failed features watch(config/routes.rb) watch(%r{^app/(.*)\.rb}) end ``` Its cheating, but Im passing non-feature filenames to guard-cucumber which its smart enough to ignore. The end result is when an app file is saved, the failed features are rerun. Ive only started using guard yesterday so please let me know if Im missing something obvious. I wouldnt be surprised. In the mean time, Im going to give this patch a try today and see how it feels.
- Loading branch information