Getting started with Cucumber
October 08, 2008
Cucumber is the new runner for Rspec plain text stories. It has a number of improvements that make it essential, and it will soon become the default runner for rspec. To get started we need to do a few things
Install the gem
sudo gem install cucumber
Run the generator for each rails project you want to have cucumber in.
Update my command in
~/.profilethat runs rails projects in textmate to include the
## this is ~/.profile ... # edit this directory for rails projects (etdr) alias etdr='mate app config features lib db public spec stories test vendor/plugins &'
Most importantly cucumber
- tells which matcher failed when a story fails
- throws an error if there are ambiguous matchers
Setting Up Textmate
Couple of bundles to install
cd ~/Library/Application\ Support/TextMate/Bundles git clone git://github.com/bmabey/webrat-tmbundle.git Webrat.tmbundle git clone git://github.com/bmabey/cucumber-tmbundle.git Cucumber.tmbundle