Sha256: b986355263564578203e68fa07975aced4d98c2cebc8503824b62d4ba52f6303

Contents?: true

Size: 627 Bytes

Versions: 9

Compression:

Stored size: 627 Bytes

Contents

require 'bundler/setup'
require 'minitest/autorun'
require 'active_model_serializers'
require 'fixtures/poro'

# 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

9 entries across 9 versions & 1 rubygems

Version Path
active_model_serializers-0.9.8 test/test_helper.rb
active_model_serializers-0.9.7 test/test_helper.rb
active_model_serializers-0.9.6 test/test_helper.rb
active_model_serializers-0.9.5 test/test_helper.rb
active_model_serializers-0.9.4 test/test_helper.rb
active_model_serializers-0.9.3 test/test_helper.rb
active_model_serializers-0.9.2 test/test_helper.rb
active_model_serializers-0.9.1 test/test_helper.rb
active_model_serializers-0.9.0 test/test_helper.rb