Skip to content
This repository was archived by the owner on Nov 16, 2018. It is now read-only.

Spoken languages

aslakhellesoy edited this page Aug 13, 2010 · 39 revisions

Communication within a team always works better when people can use their spoken language. Cucumber supports several spoken languages. This is Norwegian:

Egenskap: Summering
  For å slippe å gjøre dumme feil
  Som en regnskapsfører
  Vil jeg kunne legge sammen

  Scenario: to tall
    Gitt at jeg har tastet inn 5
    Og at jeg har tastet inn 7
    Når jeg summerer
    Så skal resultatet være 12

  Scenario: tre tall
    Gitt at jeg har tastet inn 5
    Og at jeg har tastet inn 7
    Og at jeg har tastet inn 1
    Når jeg summerer
    Så skal resultatet være 13

You have to tell Cucumber that you’re using a different language than English (the default):

cucumber --language no

Adding a new language

It’s easy!

  1. Make a fork of Cucumber and pull it down
  2. Add your language’s keywords to languages.yml
  3. Generate the parser for your language:
rake treetop:compile

That’s it! You have a new language that you can pass to

--language

Clone this wiki locally