Model tests

I've added tests for attributes definition and aliases. I will test the associations and methods in another pull request so it would be easier to review. =)