Sha256: ea4039e7029f5eded52d5dc64b5a1cedb583ce6cb99929c75463b516b53045fd

Contents?: true

Size: 952 Bytes

Versions: 8

Compression:

Stored size: 952 Bytes

Contents

require 'cases/helper'

class TestFixturesTest < ActiveRecord::TestCase
  setup do
    @klass = Class.new
    @klass.send(:include, ActiveRecord::TestFixtures)
  end

  def test_deprecated_use_transactional_fixtures=
    assert_deprecated 'use use_transactional_tests= instead' do
      @klass.use_transactional_fixtures = true
    end
  end

  def test_use_transactional_tests_prefers_use_transactional_fixtures
    ActiveSupport::Deprecation.silence do
      @klass.use_transactional_fixtures = false
    end

    assert_equal false, @klass.use_transactional_tests
  end

  def test_use_transactional_tests_defaults_to_true
    ActiveSupport::Deprecation.silence do
      @klass.use_transactional_fixtures = nil
    end

    assert_equal true, @klass.use_transactional_tests
  end

  def test_use_transactional_tests_can_be_overridden
    @klass.use_transactional_tests = "foobar"

    assert_equal "foobar", @klass.use_transactional_tests
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ibm_db-5.2.0 test/cases/test_fixtures_test.rb
ibm_db-5.1.0 test/cases/test_fixtures_test.rb
ibm_db-5.0.5 test/cases/test_fixtures_test.rb
ibm_db-5.0.4 test/cases/test_fixtures_test.rb
ibm_db-5.0.3 test/cases/test_fixtures_test.rb
ibm_db-5.0.2 test/cases/test_fixtures_test.rb
ibm_db-4.0.0-x86-mingw32 test/cases/test_fixtures_test.rb
ibm_db-4.0.0 test/cases/test_fixtures_test.rb