Those are config tests

This commit is contained in:
Santiago Pastorino 2013-10-24 13:37:15 -02:00
parent c83e643edd
commit 04f8c0c16f

View File

@ -30,7 +30,7 @@ module ActiveModel
end end
end end
class SetupTest < ActiveModel::TestCase class ConfigTest < ActiveModel::TestCase
def test_setup def test_setup
ActiveModel::Serializer.setup do |config| ActiveModel::Serializer.setup do |config|
config.a = 'v1' config.a = 'v1'
@ -43,7 +43,7 @@ module ActiveModel
CONFIG.clear CONFIG.clear
end end
def test_setup_config_accessors def test_config_accessors
ActiveModel::Serializer.setup do |config| ActiveModel::Serializer.setup do |config|
config.foo = 'v1' config.foo = 'v1'
config.bar = 'v2' config.bar = 'v2'
@ -55,7 +55,7 @@ module ActiveModel
CONFIG.clear CONFIG.clear
end end
def test_setup_acessor_when_nil def test_acessor_when_nil
assert_nil CONFIG.foo assert_nil CONFIG.foo
CONFIG.foo = 1 CONFIG.foo = 1
assert_equal 1, CONFIG.foo assert_equal 1, CONFIG.foo