Sha256: d08f6235b247f31617c5a98f7f85646cae99a511dc3533312c34aff3a7b294e6

Contents?: true

Size: 763 Bytes

Versions: 12

Compression:

Stored size: 763 Bytes

Contents

require "rubygems"
require "bundler/setup"

require 'simplecov'
SimpleCov.start do
  add_group "lib", "lib"
  add_group "spec", "spec"
end

require 'coveralls'
Coveralls.wear!

require "pry"

require "active_model_serializers"
require "active_support/json"
require "minitest/autorun"

require 'rails'

module TestHelper
  Routes = ActionDispatch::Routing::RouteSet.new
  Routes.draw do
    resource :hypermedia
    get ':controller(/:action(/:id))'
    get ':controller(/:action)'
  end

  ActionController::Base.send :include, Routes.url_helpers
  ActiveModel::Serializer.send :include, Routes.url_helpers
end

ActiveSupport::TestCase.class_eval do
  setup do
    @routes = ::TestHelper::Routes
  end
end

class Object
  undef_method :id if respond_to?(:id)
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
gpi-active_model_serializers-0.8.5 test/test_helper.rb
gpi-active_model_serializers-0.8.5.alpha1 test/test_helper.rb
gpi-active_model_serializers-0.8.4 test/test_helper.rb
gpi-active_model_serializers-0.8.4.alpha5 test/test_helper.rb
gpi-active_model_serializers-0.8.4.alpha4 test/test_helper.rb
gpi-active_model_serializers-0.8.4.alpha3 test/test_helper.rb
gpi-active_model_serializers-0.8.4.alpha2 test/test_helper.rb
gpi-active_model_serializers-0.8.4.alpha1 test/test_helper.rb
gpi-active_model_serializers-0.8.3.rc1 test/test_helper.rb
gpi-active_model_serializers-0.8.3.alpha2 test/test_helper.rb
gpi-active_model_serializers-0.8.3.alpha1 test/test_helper.rb
gpi-active_model_serializers-0.8.2 test/test_helper.rb