Refactor common spec code into spec_helper.rb