Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix I18n 0.9.3 compatibility #1133

Merged
merged 1 commit into from
Jun 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ GEM
ast (2.4.0)
concurrent-ruby (1.0.5)
docile (1.3.0)
i18n (0.9.1)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
json (2.1.0)
launchy (2.4.3)
Expand Down
4 changes: 2 additions & 2 deletions test/test_faker_city.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ def setup
address: { city_prefix: ['west'], city_suffix: ['burg'] }
}
}
I18n.backend.store_translations(:xx, xx)
I18n.config.available_locales += [:xx]
I18n.backend.store_translations(:xx, xx)

# rubocop:disable Lint/InterpolationCheck
xy = {
Expand All @@ -25,8 +25,8 @@ def setup
}
}
# rubocop:enable Lint/InterpolationCheck
I18n.backend.store_translations(:xy, xy)
I18n.config.available_locales += [:xy]
I18n.backend.store_translations(:xy, xy)
end

def teardown
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_commerce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def test_department_should_accept_localized_separator
}
}

I18n.backend.store_translations(:xy, data)
I18n.config.available_locales += [:xy]
I18n.backend.store_translations(:xy, data)
I18n.with_locale(:xy) do
assert_match ' + ', @tester.department(2, true)
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_street.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ def setup
}
}
# rubocop:enable Lint/InterpolationCheck
I18n.backend.store_translations(:shire, shire)
I18n.config.available_locales += [:shire]
I18n.backend.store_translations(:shire, shire)
end

def teardown
Expand Down
2 changes: 1 addition & 1 deletion test/test_faker_zip_code.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ def setup
}
}

I18n.config.available_locales += %i[xy xz]
I18n.backend.store_translations(:xy, locale_without_state)
I18n.backend.store_translations(:xz, locale_with_state)
I18n.config.available_locales += %i[xy xz]
@tester = Faker::Address
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_flexible.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ class Foodie < Base
class TestFlexible < Test::Unit::TestCase
def setup
@old_locales = I18n.config.available_locales
I18n.config.available_locales += %i[xx home kindergarden work]
I18n.backend.store_translations(:xx, faker: { chow: { yummie: %i[fudge chocolate caramel], taste: 'delicious' } })
I18n.backend.store_translations(:home, faker: { address: { birthplace: %i[bed hospital airplane] } })
I18n.backend.store_translations(:kindergarden, faker: { name: { girls_name: %i[alice cheryl tatiana] } })
I18n.backend.store_translations(:work, faker: { company: { do_stuff: %i[work work work] } })
I18n.config.available_locales += %i[xx home kindergarden work]
end

def teardown
Expand Down