Detected 1 occurrence(s) of ‘\s*pass[word]+\s*[:=]\s*["'][a-z0-9\-_\!\$]+["']‘: . . private def setting_password? self.password.present? or self.password_confirmation.present? end . . end before (:each) do @user_attributes = { name: 'sample user', email: 'user@sample.com', mobile: '2125551234', password: 'foobar', password_confirmation: 'foobar' } @user = User.new(@user_attributes) end it 'without a password' do @user.password = nil expect(@user.valid?(:create)).to be false end it 'without password confirmation' […]
↧