add some rspec tests

This feature could have come earlier but it is an improvement all the
same.