diff options
author | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-24 20:46:41 +0300 |
---|---|---|
committer | Maxim Rydkin <maks.rydkin@gmail.com> | 2017-08-29 11:14:42 +0300 |
commit | 90112f57d26a21a6c219e24367b7ef91d93858ad (patch) | |
tree | b4d306f12c57b89b616c8df35e5fc9846f887d92 | |
parent | 81061aef62e603aa122c5c3a58ca8cfd9341a59b (diff) | |
download | gitlab-ce-90112f57d26a21a6c219e24367b7ef91d93858ad.tar.gz |
replace `is_member_of` with `member_of?`
-rw-r--r-- | .rubocop_todo.yml | 6 | ||||
-rw-r--r-- | features/steps/shared/group.rb | 14 |
2 files changed, 10 insertions, 10 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index f51228180c8..9186501ca96 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -244,11 +244,11 @@ Style/PerlBackrefs: # NameWhitelist: is_a? Style/PredicateName: Enabled: true - Exclude: - - 'features/*' + # Exclude: + # - 'features/*' # NamePrefix: is_ NamePrefixBlacklist: is_ - NameWhitelist: has_n_stars + NameWhitelist: have_visible_content # Offense count: 58 # Cop supports --auto-correct. diff --git a/features/steps/shared/group.rb b/features/steps/shared/group.rb index de119f2c6c0..45fad83e8bb 100644 --- a/features/steps/shared/group.rb +++ b/features/steps/shared/group.rb @@ -2,27 +2,27 @@ module SharedGroup include Spinach::DSL step 'current user is developer of group "Owned"' do - is_member_of(current_user.name, "Owned", Gitlab::Access::DEVELOPER) + member_of?(current_user.name, "Owned", Gitlab::Access::DEVELOPER) end step '"John Doe" is owner of group "Owned"' do - is_member_of("John Doe", "Owned", Gitlab::Access::OWNER) + member_of?("John Doe", "Owned", Gitlab::Access::OWNER) end step '"John Doe" is guest of group "Guest"' do - is_member_of("John Doe", "Guest", Gitlab::Access::GUEST) + member_of?("John Doe", "Guest", Gitlab::Access::GUEST) end step '"Mary Jane" is owner of group "Owned"' do - is_member_of("Mary Jane", "Owned", Gitlab::Access::OWNER) + member_of?("Mary Jane", "Owned", Gitlab::Access::OWNER) end step '"Mary Jane" is guest of group "Owned"' do - is_member_of("Mary Jane", "Owned", Gitlab::Access::GUEST) + member_of?("Mary Jane", "Owned", Gitlab::Access::GUEST) end step '"Mary Jane" is guest of group "Guest"' do - is_member_of("Mary Jane", "Guest", Gitlab::Access::GUEST) + member_of?("Mary Jane", "Guest", Gitlab::Access::GUEST) end step 'I should see group "TestGroup"' do @@ -35,7 +35,7 @@ module SharedGroup protected - def is_member_of(username, groupname, role) + def member_of?(username, groupname, role) @project_count ||= 0 user = User.find_by(name: username) || create(:user, name: username) group = Group.find_by(name: groupname) || create(:group, name: groupname) |