Add RSpec tests

I'd love to have some basic tests in place for commits and pull requests. Even though it's not perfect (I'm sure some tests can be written much more beautifully), I think it's useful to include them already.