mirror of https://github.com/rails/rails
Add Missing Test Cases for the constantize
This commit is contained in:
parent
dc73e39b4d
commit
885ebda266
|
@ -27,13 +27,24 @@ module ConstantizeTestCases
|
|||
assert_equal Ace::Base::Case, yield("Ace::Base::Case")
|
||||
assert_equal Ace::Base::Case, yield("::Ace::Base::Case")
|
||||
assert_equal Ace::Base::Case::Dice, yield("Ace::Base::Case::Dice")
|
||||
assert_equal Ace::Base::Case::Dice, yield("Ace::Base::Fase::Dice")
|
||||
assert_equal Ace::Base::Fase::Dice, yield("Ace::Base::Fase::Dice")
|
||||
|
||||
assert_equal Ace::Gas::Case, yield("Ace::Gas::Case")
|
||||
assert_equal Ace::Gas::Case::Dice, yield("Ace::Gas::Case::Dice")
|
||||
assert_equal Ace::Base::Case::Dice, yield("Ace::Gas::Case::Dice")
|
||||
|
||||
assert_equal Case::Dice, yield("Case::Dice")
|
||||
assert_equal AddtlGlobalConstants::Case::Dice, yield("Case::Dice")
|
||||
assert_equal Object::AddtlGlobalConstants::Case::Dice, yield("Case::Dice")
|
||||
|
||||
assert_equal Case::Dice, yield("Object::Case::Dice")
|
||||
assert_equal AddtlGlobalConstants::Case::Dice, yield("Object::Case::Dice")
|
||||
assert_equal Object::AddtlGlobalConstants::Case::Dice, yield("Case::Dice")
|
||||
|
||||
assert_equal ConstantizeTestCases, yield("ConstantizeTestCases")
|
||||
assert_equal ConstantizeTestCases, yield("::ConstantizeTestCases")
|
||||
|
||||
assert_raises(NameError) { yield("UnknownClass") }
|
||||
assert_raises(NameError) { yield("UnknownClass::Ace") }
|
||||
assert_raises(NameError) { yield("UnknownClass::Ace::Base") }
|
||||
|
|
Loading…
Reference in New Issue