Sha256: 5bbaaacd03dcf0344b04250e26653669a88bed0d7e696f315adba0df6413aff3

Contents?: true

Size: 1.57 KB

Versions: 9

Compression:

Stored size: 1.57 KB

Contents

require 'test_helper'

class I18nMemoizeBackendWithSimpleApiTest < I18n::TestCase
  include I18n::Tests::Basics
  include I18n::Tests::Defaults
  include I18n::Tests::Interpolation
  include I18n::Tests::Link
  include I18n::Tests::Lookup
  include I18n::Tests::Pluralization
  include I18n::Tests::Procs
  include I18n::Tests::Localization::Date
  include I18n::Tests::Localization::DateTime
  include I18n::Tests::Localization::Time
  include I18n::Tests::Localization::Procs

  class MemoizeBackend < I18n::Backend::Simple
    include I18n::Backend::Memoize
  end

  def setup
    I18n.backend = MemoizeBackend.new
    super
  end

  test "make sure we use the MemoizeBackend backend" do
    assert_equal MemoizeBackend, I18n.backend.class
  end
end

I18n::TestCase.setup_rufus_tokyo

class I18nMemoizeBackendWithKeyValueApiTest < I18n::TestCase
  include I18n::Tests::Basics
  include I18n::Tests::Defaults
  include I18n::Tests::Interpolation
  include I18n::Tests::Link
  include I18n::Tests::Lookup
  include I18n::Tests::Pluralization
  include I18n::Tests::Localization::Date
  include I18n::Tests::Localization::DateTime
  include I18n::Tests::Localization::Time

  # include I18n::Tests::Procs
  # include I18n::Tests::Localization::Procs

  class MemoizeBackend < I18n::Backend::KeyValue
    include I18n::Backend::Memoize
  end

  STORE = Rufus::Tokyo::Cabinet.new('*')

  def setup
    I18n.backend = MemoizeBackend.new(STORE)
    super
  end

  test "make sure we use the MemoizeBackend backend" do
    assert_equal MemoizeBackend, I18n.backend.class
  end
end if defined?(Rufus::Tokyo::Cabinet)

Version data entries

9 entries across 4 versions & 4 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/i18n-0.6.11/test/api/memoize_test.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/i18n-0.6.11/test/api/memoize_test.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/i18n-0.6.11/test/api/memoize_test.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/2.1.0/gems/i18n-0.6.11/test/api/memoize_test.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/i18n-0.6.11/test/api/memoize_test.rb
apl-library-0.0.90 vendor/bundle/ruby/1.8/gems/i18n-0.6.11/test/api/memoize_test.rb
apl-library-0.0.90 vendor/bundle/ruby/2.1.0/gems/apl-library-0.0.90/vendor/bundle/ruby/1.8/gems/i18n-0.6.11/test/api/memoize_test.rb
nanumfont-rails-0.1 vendor/bundle/ruby/2.1.0/gems/i18n-0.6.11/test/api/memoize_test.rb
i18n-0.6.11 test/api/memoize_test.rb