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

Fixed I18n fallback issue #7

Merged
merged 1 commit into from
Oct 3, 2018
Merged
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
6 changes: 4 additions & 2 deletions spec/integration/messages/i18n_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,14 @@
context 'fallbacking to I18n.default_locale with fallback backend config' do
before do
require "i18n/backend/fallbacks"

# https://github.com/svenfuchs/i18n/pull/415
# Since I18n does not provide default fallbacks anymore, we have to do this explicitly
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
I18n.fallbacks = I18n::Locale::Fallbacks.new(:en)
end

it 'returns a message for a predicate in the default_locale' do
pending "i18n fallback API changed, so this spec started failing"

message = messages[:even?, path: :some_number]

expect(I18n.locale).to eql(:pl)
Expand Down