Use shoulda-matchers gem and refactor

Refactor specs. Add more specs for better code coverage.

Using shoulda-matchers makes the specs more readable.