Sha256: 496dd3d04d9b540c1d44e966abab44985b8d6963bba7cf0907ad346bfc6b4a99

Contents?: true

Size: 864 Bytes

Versions: 3

Compression:

Stored size: 864 Bytes

Contents

# encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/../../test_helper')

setup_active_record


class I18nActiveRecordApiTest < Test::Unit::TestCase
  def setup
    I18n.backend = I18n::Backend::ActiveRecord.new
    super
  end

  include Tests::Api::Basics
  include Tests::Api::Defaults
  include Tests::Api::Interpolation
  include Tests::Api::Link
  include Tests::Api::Lookup
  include Tests::Api::Pluralization
  include Tests::Api::Procs unless RUBY_VERSION >= '1.9.1'

  include Tests::Api::Localization::Date
  include Tests::Api::Localization::DateTime
  include Tests::Api::Localization::Time
  include Tests::Api::Localization::Procs unless RUBY_VERSION >= '1.9.1'

  define_method "test: make sure we use an ActiveRecord backend" do
    assert_equal I18n::Backend::ActiveRecord, I18n.backend.class
  end
end if defined?(ActiveRecord)

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
activesupport-2.3.6.pre lib/active_support/vendor/i18n-0.3.3/test/cases/api/active_record_test.rb
i18n-0.3.3 test/cases/api/active_record_test.rb
i18n-0.3.2 test/cases/api/active_record_test.rb