diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-17 19:15:24 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-10-17 19:15:24 +0530 |
commit | 8dffc62a9b957c91575f7c014f50806e86d64505 (patch) | |
tree | 3d9c13ca3079df135acb6cd396b85819614b80ae | |
parent | 826a85069627060c11baf932423702b1228dd4df (diff) | |
download | rails-8dffc62a9b957c91575f7c014f50806e86d64505.tar.gz rails-8dffc62a9b957c91575f7c014f50806e86d64505.tar.bz2 rails-8dffc62a9b957c91575f7c014f50806e86d64505.zip |
use variables from test setup
-rw-r--r-- | activemodel/test/cases/secure_password_test.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/activemodel/test/cases/secure_password_test.rb b/activemodel/test/cases/secure_password_test.rb index 6950c3be1f..4338a3fc53 100644 --- a/activemodel/test/cases/secure_password_test.rb +++ b/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 |