Fix constant lookup when serializer is not available.

This commit is contained in:
José Valim
2011-12-21 09:11:04 +01:00
parent cc5f102e2d
commit b9d56a5168
2 changed files with 23 additions and 7 deletions

View File

@@ -0,0 +1,11 @@
require "test_helper"
class RandomModel
include ActiveModel::SerializerSupport
end
class SerializerSupportTest < ActiveModel::TestCase
test "it returns nil if no serializer exists" do
assert_equal nil, RandomModel.new.active_model_serializer
end
end