refactored helpers_spec.rb