rubocop files update and auto correction
This commit is contained in:
parent
42e8bb11ea
commit
2a30b076b8
88 changed files with 519 additions and 452 deletions
|
|
@ -1,7 +1,5 @@
|
|||
RSpec.configure do |config|
|
||||
|
||||
config.before(:suite) do
|
||||
FactoryGirl.lint
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ module Flash
|
|||
return 'none'
|
||||
end
|
||||
if results.count > 1
|
||||
texts = results.map { |r| r.text }
|
||||
texts = results.map(&:text)
|
||||
fail "One flash expected, but we had #{texts.inspect}"
|
||||
end
|
||||
results.first.text
|
||||
|
|
|
|||
|
|
@ -10,33 +10,33 @@ module OmniauthMacros
|
|||
def mock_auth_new_user
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-1',
|
||||
info: {
|
||||
name: 'new user name',
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-1',
|
||||
info: {
|
||||
name: 'new user name',
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_new_user_fb
|
||||
OmniAuth.config.mock_auth[:facebook] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'facebook',
|
||||
uid: 'facebook-test-uid-1',
|
||||
info: {
|
||||
name: 'new user fb name',
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
provider: 'facebook',
|
||||
uid: 'facebook-test-uid-1',
|
||||
info: {
|
||||
name: 'new user fb name',
|
||||
email: 'test-1@gmail.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_existing_user_participant
|
||||
|
|
@ -44,17 +44,17 @@ module OmniauthMacros
|
|||
# authentication hashes to return during integration testing.
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-participant-1',
|
||||
info: {
|
||||
name: 'existing user participant name',
|
||||
email: 'test-participant-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-participant-1',
|
||||
info: {
|
||||
name: 'existing user participant name',
|
||||
email: 'test-participant-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
|
||||
def mock_auth_existing_user_admin
|
||||
|
|
@ -62,16 +62,16 @@ module OmniauthMacros
|
|||
# authentication hashes to return during integration testing.
|
||||
OmniAuth.config.mock_auth[:google] =
|
||||
OmniAuth::AuthHash.new(
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-admin-1',
|
||||
info: {
|
||||
name: 'existing user admin name',
|
||||
email: 'test-admin-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
provider: 'google',
|
||||
uid: 'google-test-uid-admin-1',
|
||||
info: {
|
||||
name: 'existing user admin name',
|
||||
email: 'test-admin-1@google.com'
|
||||
},
|
||||
credentials: {
|
||||
token: 'mock_token',
|
||||
secret: 'mock_secret'
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
RSpec.configure do |config|
|
||||
config.after(:each, type: :feature) do
|
||||
ename = RSpec.current_example.full_description
|
||||
ename = ename.gsub ' ', '_'
|
||||
ename = ename.tr ' ', '_'
|
||||
ename.downcase!
|
||||
ename = ename + '.html'
|
||||
if RSpec.current_example.exception.present?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue