Added RSpec tests, although these are untested and should be checked over by someone who actually knows anything about RSpec before being pulled