Class: ActiveModel::TestCase

Inherits:
ActiveSupport::TestCase show all
Defined in:
activemodel/lib/active_model/test_case.rb

Overview

:nodoc:

Constant Summary

Constants inherited from ActiveSupport::TestCase

ActiveSupport::TestCase::Assertion

Instance Method Summary collapse

Methods inherited from ActiveSupport::TestCase

for_tag

Methods included from ActiveSupport::Testing::Declarative

extended, #test

Methods included from ActiveRecord::TestFixtures

#enlist_fixture_connections, #run_in_transaction?, #setup_fixtures, #teardown_fixtures

Methods included from ActiveSupport::Concern

#append_features, extended, #included

Methods included from ActiveSupport::Testing::Pending

#pending

Methods included from ActiveSupport::Testing::Deprecation

#assert_deprecated, #assert_not_deprecated

Methods included from ActiveSupport::Testing::Assertions

#assert_blank, #assert_difference, #assert_no_difference, #assert_present

Instance Method Details

#with_kcode(kcode) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
# File 'activemodel/lib/active_model/test_case.rb', line 3

def with_kcode(kcode)
  if RUBY_VERSION < '1.9'
    orig_kcode, $KCODE = $KCODE, kcode
    begin
      yield
    ensure
      $KCODE = orig_kcode
    end
  else
    yield
  end
end