Skip to content

Textmate trick for failing cucumber stories

Quick tip: if you’re trying to clean up some failing cucumber features, and you get output like so: cucumber features/my_feature.feature:24 # Scenario: My user does stuff cucumber features/my_feature.feature:38 # Scenario: My user does more stuff

And you’d rather it look like this:

bundle exec cucumber features/my_feature.feature:24 -f pretty bundle exec cucumber features/my_feature.feature:38 -f pretty

So you can copy/paste back into terminal to run the features under bundler with pleasant output, here’s how:

  • Copy paste the failing scenario lines to a new textmate window;
  • Do cmd-f for find/replace – put cucumber (.) #. in the ‘find’ and bundle exec cucumber $1 -f pretty in the ‘replace’, and check ‘regular expression’, then ‘replace all’.

Post a Comment

Your email is never published nor shared. Required fields are marked *