Installing Cucumber (Ruby)
Archive - Originally posted on "The Horse's Mouth" - 2015-01-03 10:09:37 - Graham EllisArticles in this "Introduction to Cucumber" series:
[link] - Installing Cucumber for Ruby
[link] - Hello Test Cucumber World
[link] - First real tests / second example
[link] - Improved tests with RSpec
Cucumber is a behaviour driven development tool written in Ruby, and primarily (but not exclusively) for use in Ruby.
I'm logging this largely for the record - Cucumber comes as a Ruby Gem and easily installs.
WomanWithCat:r107 grahamellis$ sudo gem install cucumber
Password:
Building native extensions. This could take a while...
Successfully installed gherkin-2.12.2
Fetching: multi_test-0.1.1.gem (100%)
Successfully installed multi_test-0.1.1
Fetching: cucumber-1.3.18.gem (100%)
Successfully installed cucumber-1.3.18
Parsing documentation for gherkin-2.12.2
Installing ri documentation for gherkin-2.12.2
Parsing documentation for multi_test-0.1.1
Installing ri documentation for multi_test-0.1.1
Parsing documentation for cucumber-1.3.18
Installing ri documentation for cucumber-1.3.18
3 gems installed
WomanWithCat:r107 grahamellis$
Here's the help message after install
WomanWithCat:cuc grahamellis$ cucumber --help
Usage: cucumber [options] [ [FILE|DIR|URL][:LINE[:LINE]*] ]+
Examples:
cucumber examples/i18n/en/features
cucumber @rerun.txt (See --format rerun)
cucumber examples/i18n/it/features/somma.feature:6:98:113
cucumber -s -i http://rubyurl.com/eeCl
etc ... all options listed!
First use turns out to be not quote so simple - you need to specify a behaviour, then code that tests that behaviour, then the class / code that implements that behaviour. Easy if you're lead through it on one of our Ruby courses or you might like to take the very first steps from [here]