Add Missing Test Cases for the constantize

This commit is contained in:
Aditya Kapoor 2014-06-07 23:58:38 +05:30
parent dc73e39b4d
commit 885ebda266
1 changed files with 11 additions and 0 deletions

View File

@ -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") }