Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stereosupersonic authored and radar committed Jul 23, 2020
1 parent e90c23f commit 2e594bf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/backend/fallbacks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ def setup
end

class I18nBackendFallbacksWithCustomClass < I18n::TestCase
class BackendWithFallbacks < I18n::Backend::Simple
include I18n::Backend::Fallbacks
end
class MyDefaultFallback
# this is a stupid change
# but it showes that you can use any object as fallback
Expand All @@ -139,8 +142,7 @@ def [](key)

def setup
super
I18n.backend = I18n::Backend::Simple.new
I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
I18n.backend = BackendWithFallbacks.new
I18n.enforce_available_locales = false
I18n.fallbacks = MyDefaultFallback.new
store_translations(:my_language, foo: 'customer foo')
Expand Down

0 comments on commit 2e594bf

Please sign in to comment.