Sunday 24 June 2012

Cucumber Feature Fun

This post will be expanded later. For now its just a note to self.
http://lmarburger.github.com/2009/09/cucumber-features-in-subdirectories.html
http://robots.thoughtbot.com/post/189412598/five-ridiculously-awesome-cucumber-and-webrat
NOTE TO SELF:
Cucumber will not find step definitions when running a single feature unless you tell it to require the whole folder.

Good
cucumber --require folder_with_step_definitions feature_file_I_want_to_run
Real life Example:
cucumber -r features features/courses #whole folder
cucumber -r features features/courses/new_course.feature #Single Feature

Bad
cucumber feature_file_I_want_to_run
#Will hit a wall of Step Definition Missing messages.
cucumber -r /features /features/courses #Will cause it to start looking from Root and not Rails.root causing File Not Found issues