RSpec tests

The added RSpec tests are both from transferring from the rake tests and new tests.