add tests for sub classes
split some code to .inherited for direct calling the sub classes

fix #11
Merge pull request #12 from kachick/fix-#11

Subclass.new should always be available