aboutsummaryrefslogblamecommitdiffstats
path: root/activemodel/lib/active_model/test_case.rb
blob: 4cb5c9cbc010e2f5b2493752476205070a5fd167 (plain) (tree)
1
2
3
4



                                                   











                                          

     
require "active_support/test_case"

module ActiveModel #:nodoc:
  class TestCase < ActiveSupport::TestCase #:nodoc:
    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
  end
end