diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-10-14 09:57:41 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-10-14 09:57:41 -0700 |
commit | 6338e1e68dfbe77c39eaaa17bb4950ef7db73704 (patch) | |
tree | 6bca387ebcc859a5f277a65f268cd885c7e1b00c /railties/test/application/initializers | |
parent | 1974911b8d5780ec16e138027a0099bd8482f88f (diff) | |
parent | 5ad7f8ab418f0c760dbb584f7c78d94ce32e9ee3 (diff) | |
download | rails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.tar.gz rails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.tar.bz2 rails-6338e1e68dfbe77c39eaaa17bb4950ef7db73704.zip |
Merge pull request #7941 from robin850/master
Use 1.9 Hash syntax in railties
Diffstat (limited to 'railties/test/application/initializers')
-rw-r--r-- | railties/test/application/initializers/i18n_test.rb | 14 | ||||
-rw-r--r-- | railties/test/application/initializers/notifications_test.rb | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/railties/test/application/initializers/i18n_test.rb b/railties/test/application/initializers/i18n_test.rb index 02d20bc150..489b7ddb92 100644 --- a/railties/test/application/initializers/i18n_test.rb +++ b/railties/test/application/initializers/i18n_test.rb @@ -143,7 +143,7 @@ en: I18n::Railtie.config.i18n.fallbacks = true load_app assert I18n.backend.class.included_modules.include?(I18n::Backend::Fallbacks) - assert_fallbacks :de => [:de, :en] + assert_fallbacks de: [:de, :en] end test "config.i18n.fallbacks = true initializes I18n.fallbacks with default settings even when backend changes" do @@ -151,37 +151,37 @@ en: I18n::Railtie.config.i18n.backend = Class.new(I18n::Backend::Simple).new load_app assert I18n.backend.class.included_modules.include?(I18n::Backend::Fallbacks) - assert_fallbacks :de => [:de, :en] + assert_fallbacks de: [:de, :en] end test "config.i18n.fallbacks.defaults = [:'en-US'] initializes fallbacks with en-US as a fallback default" do I18n::Railtie.config.i18n.fallbacks.defaults = [:'en-US'] load_app - assert_fallbacks :de => [:de, :'en-US', :en] + assert_fallbacks de: [:de, :'en-US', :en] end test "config.i18n.fallbacks.map = { :ca => :'es-ES' } initializes fallbacks with a mapping ca => es-ES" do I18n::Railtie.config.i18n.fallbacks.map = { :ca => :'es-ES' } load_app - assert_fallbacks :ca => [:ca, :"es-ES", :es, :en] + assert_fallbacks ca: [:ca, :"es-ES", :es, :en] end test "[shortcut] config.i18n.fallbacks = [:'en-US'] initializes fallbacks with en-US as a fallback default" do I18n::Railtie.config.i18n.fallbacks = [:'en-US'] load_app - assert_fallbacks :de => [:de, :'en-US', :en] + assert_fallbacks de: [:de, :'en-US', :en] end test "[shortcut] config.i18n.fallbacks = [{ :ca => :'es-ES' }] initializes fallbacks with a mapping de-AT => de-DE" do I18n::Railtie.config.i18n.fallbacks.map = { :ca => :'es-ES' } load_app - assert_fallbacks :ca => [:ca, :"es-ES", :es, :en] + assert_fallbacks ca: [:ca, :"es-ES", :es, :en] end test "[shortcut] config.i18n.fallbacks = [:'en-US', { :ca => :'es-ES' }] initializes fallbacks with the given arguments" do I18n::Railtie.config.i18n.fallbacks = [:'en-US', { :ca => :'es-ES' }] load_app - assert_fallbacks :ca => [:ca, :"es-ES", :es, :'en-US', :en] + assert_fallbacks ca: [:ca, :"es-ES", :es, :'en-US', :en] end end end diff --git a/railties/test/application/initializers/notifications_test.rb b/railties/test/application/initializers/notifications_test.rb index d866a63fe0..baae6fd928 100644 --- a/railties/test/application/initializers/notifications_test.rb +++ b/railties/test/application/initializers/notifications_test.rb @@ -33,7 +33,7 @@ module ApplicationTests ActiveRecord::Base.logger = logger # Mimic Active Record notifications - instrument "sql.active_record", :name => "SQL", :sql => "SHOW tables" + instrument "sql.active_record", name: "SQL", sql: "SHOW tables" wait assert_equal 1, logger.logged(:debug).size |