Sha256: 0ed69b753c77b2b953e1869c4f78afb69c9ea144e8371622c53abab4138e9609
Contents?: true
Size: 772 Bytes
Versions: 3
Compression:
Stored size: 772 Bytes
Contents
require 'bundler/setup' require 'minitest/autorun' require 'active_model_serializers' require 'fixtures/poro' begin require 'rails-controller-testing' Rails::Controller::Testing.install rescue LoadError false # Rails 5 < backward compatibility end # Ensure backward compatibility with Minitest 4 Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) module TestHelper Routes = ActionDispatch::Routing::RouteSet.new Routes.draw do get ':controller(/:action(/:id))' get ':controller(/:action)' end ActionController::Base.send :include, Routes.url_helpers ActionController::Base.send :include, ActionController::Serialization end ActionController::TestCase.class_eval do def setup @routes = TestHelper::Routes end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
active_model_serializers-0.9.13 | test/test_helper.rb |
active_model_serializers-0.9.12 | test/test_helper.rb |
active_model_serializers-0.9.11 | test/test_helper.rb |