refactoring user-spec.rb code