Sha256: d89b9767b2db031354d09d0abf1e3724c17045450a09cc52dc8fccf7c18072e7

Contents?: true

Size: 705 Bytes

Versions: 3

Compression:

Stored size: 705 Bytes

Contents

#Scenario: Simple example and simple translation
#  Given a source file "translations/en.yaml" with:
#    """
#    hello: Hello World!
#    """
#  When I have the locale setted as "en"
#  And I write "hello" in the translation engine
#  Then I should see "Hello World!"

Given /^a source file "(.*?)" with:$/ do |file, content|
  Fast.file.write file, content
end

When /^I have the locale setted as "(.*?)"$/ do |locale|
  G11n::Translator.instance.locale = locale.to_sym
end

And /^I write "(.*?)" in the translation engine$/ do |identifier|
  @the_translation = eval "G11n::Translator.instance.translate.#{identifier}"
end

Then /^I should see "(.*?)"$/ do |text|
  @the_translation.should == text
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
g11n-0.0.3 features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb
g11n-0.0.2 features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb
g11n-0.0.1 features/stepdefs/get_a_translation/simple_example_and_simple_translation.rb