refactored rspec and added spec/utilities.rb