Sha256: 92b65f8dc80a250bab16b499131c84d1945a99a134ad251ff2f7473b4517c89b
Contents?: true
Size: 1 KB
Versions: 1
Compression:
Stored size: 1 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 @result = 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.4 | features/stepdefs/domain_specific_language/setup_the_translations_path_the_locale_and_get_a_translation.rb |