Fix broken tests

When we run `bundle exec rspec` locally, the test suite doesn't pass.

These changes make the test suite green again.

It would be good to set up travis-ci so that we catch things like this in the future.