Add tests
Use #map instead of #inject
Refactor tests
Merge pull request #1 from mirego/feature/tests

Add tests