Sha256: dec02e5274e06b214bd72fdb8f402c1deb31a629e144aed27c5f25f51e65ca67
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
#Scenario: Setup the translations path, the locale and get a translation # Given a source file "i18n/uy.yaml" with: # """ # bebida: # nacional: Mate # """ # When I send :path "i18n" to the DSL # And I send :locale :uy to the DSL # And I run "bebida.nacional" on the :t method # Then I should see "Mate" When /^I send :(\w+) "(.+?)" to the configuration DSL$/ do |message, argument| o = Object.new o.extend G11n::Configuration o.send message.to_sym, argument end And /^I send :(\w+) :(\w+) to the configuration DSL$/ do |message, argument| o = Object.new o.extend G11n::Configuration o.send message.to_sym, argument end And /^I run "(.*?)" on the :(\w+) method$/ do |argument, message| o = Object.new o.extend G11n::DSL @the_translation = eval "o.#{message}.#{argument}" end When /^I send :(\w+) to the configuration DSL$/ do |message| o = Object.new o.extend G11n::Configuration @result = o.send message.to_sym end Then /^I should see :(\w+)$/ do |locale| @result = locale.to_sym end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
g11n-0.0.3 | features/stepdefs/domain_specific_language/setup_the_translations_path_the_locale_and_get_a_translation.rb |