active_model_serializers/test/test_helper.rb
Yehuda Katz df9ad0ef11 Improve serializers:
* Many nested levels of associations can now insert
  their information alongside the original when
  embed :ids, :include => true is true
* Add support for passing options to serializers
* Fix Array serializers so they don't try to insert
  roots for each child object and so they can be
  provided a root.
* TODO: Array serializers should require a root
* TODO: Make merging associations at the root more
  efficient if possible
2011-12-20 00:03:29 -08:00

25 lines
470 B
Ruby

require "rubygems"
require "bundler/setup"
require "active_model_serializers"
require "active_support/json"
require "test/unit"
require 'rails'
module TestHelper
Routes = ActionDispatch::Routing::RouteSet.new
Routes.draw do
match ':controller(/:action(/:id))'
match ':controller(/:action)'
end
ActionController::Base.send :include, Routes.url_helpers
end
ActiveSupport::TestCase.class_eval do
setup do
@routes = ::TestHelper::Routes
end
end