This is a library - I think it might be more appropriate for it to be a module.  Also, it might be appropriate to fold it into spec_helper.rb?