Use local vars for tests

This commit is contained in:
Jan-Willem van der Meer 2014-09-01 13:02:41 +02:00
parent 0c34fa3ea0
commit 0ec4abf73c
1 changed files with 6 additions and 6 deletions

View File

@ -31,8 +31,8 @@ describe Gitlab::OAuth::User do
describe :create do
it "should create user from LDAP" do
@auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'ldap')
user = gl_auth.create(auth)
user.should be_valid
user.extern_uid.should == info.uid
@ -40,8 +40,8 @@ describe Gitlab::OAuth::User do
end
it "should create user from Omniauth" do
@auth = double(info: info, provider: 'twitter')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'twitter')
user = gl_auth.create(auth)
user.should be_valid
user.extern_uid.should == info.uid
@ -49,8 +49,8 @@ describe Gitlab::OAuth::User do
end
it "should apply defaults to user" do
@auth = double(info: info, provider: 'ldap')
user = gl_auth.create(@auth)
auth = double(info: info, provider: 'ldap')
user = gl_auth.create(auth)
user.should be_valid
user.projects_limit.should == Gitlab.config.gitlab.default_projects_limit