Refactoring for running rspec tests both locally and on Travis CI