Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use variables from test setup

  • Loading branch information...
commit 8dffc62a9b957c91575f7c014f50806e86d64505 1 parent 826a850
@vijaydev vijaydev authored
Showing with 4 additions and 6 deletions.
  1. +4 −6 activemodel/test/cases/secure_password_test.rb
View
10 activemodel/test/cases/secure_password_test.rb
@@ -10,15 +10,13 @@ class SecurePasswordTest < ActiveModel::TestCase
end
test "blank password" do
- user = User.new
- user.password = ''
- assert !user.valid?, 'user should be invalid'
+ @user.password = ''
+ assert !@user.valid?, 'user should be invalid'
end
test "nil password" do
- user = User.new
- user.password = nil
- assert !user.valid?, 'user should be invalid'
+ @user.password = nil
+ assert !@user.valid?, 'user should be invalid'
end
test "password must be present" do
Please sign in to comment.
Something went wrong with that request. Please try again.