Sha256: 8f5ea236ccbdbacea9a3b16dc78e3e734d50cca7781968963efd985a66d5ec0e
Contents?: true
Size: 1.6 KB
Versions: 1
Compression:
Stored size: 1.6 KB
Contents
# Configure Rails Environment ENV['RAILS_ENV'] = 'test' require 'bundler/setup' begin require 'simplecov' AppCoverage.start rescue LoadError STDERR.puts 'Running without SimpleCov' end require 'timecop' require 'rails' require 'action_controller' require 'action_controller/test_case' require 'action_controller/railtie' require 'active_model_serializers' require 'fileutils' FileUtils.mkdir_p(File.expand_path('../../tmp/cache', __FILE__)) gem 'minitest' begin require 'minitest' rescue LoadError # Minitest 4 require 'minitest/autorun' $minitest_version = 4 # https://github.com/seattlerb/minitest/blob/644a52fd0/lib/minitest/autorun.rb # https://github.com/seattlerb/minitest/blob/644a52fd0/lib/minitest/unit.rb#L768-L787 # Ensure backward compatibility with Minitest 4 Minitest = MiniTest unless defined?(Minitest) Minitest::Test = MiniTest::Unit::TestCase else # Minitest 5 require 'minitest/autorun' $minitest_version = 5 # https://github.com/seattlerb/minitest/blob/e21fdda9d/lib/minitest/autorun.rb # https://github.com/seattlerb/minitest/blob/e21fdda9d/lib/minitest.rb#L45-L59 # Filter out Minitest backtrace while allowing backtrace from other libraries # to be shown. Minitest.backtrace_filter = Minitest::BacktraceFilter.new end require 'support/rails_app' # require "rails/test_help" require 'support/serialization_testing' require 'support/rails5_shims' require 'fixtures/active_record' require 'fixtures/poro' ActiveSupport.on_load(:action_controller) do $action_controller_logger = ActiveModelSerializers.logger ActiveModelSerializers.logger = Logger.new(IO::NULL) end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_model_serializers-0.10.0.rc5 | test/test_helper.rb |