From 3a2abc1d50b419a353edb7f7cf68f3894dfdeeef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Wed, 16 Jan 2019 13:09:29 +0100 Subject: Enable the Layout/ExtraSpacing cop MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- .../features/resolving_discussions_in_issues_shared_examples.rb | 2 +- spec/support/helpers/graphql_helpers.rb | 2 +- spec/support/helpers/login_helpers.rb | 2 +- spec/support/redis/redis_shared_examples.rb | 4 ++-- spec/support/shared_examples/malicious_regexp_shared_examples.rb | 2 +- spec/support/shared_examples/mentionable_shared_examples.rb | 4 ++-- spec/support/shared_examples/url_validator_examples.rb | 2 +- 7 files changed, 9 insertions(+), 9 deletions(-) (limited to 'spec/support') diff --git a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb index 4a946995f84..38e5fb155a4 100644 --- a/spec/support/features/resolving_discussions_in_issues_shared_examples.rb +++ b/spec/support/features/resolving_discussions_in_issues_shared_examples.rb @@ -5,7 +5,7 @@ shared_examples 'creating an issue for a discussion' do expect(title_field.value).to include(merge_request.title) end - it 'has a mention of the discussion in the description' do + it 'has a mention of the discussion in the description' do description_field = page.find_field('issue[description]') expect(description_field.value).to include(discussion.first_note.note) diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index dd32ea3985f..ea3a03879c5 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -149,7 +149,7 @@ module GraphqlHelpers # - List # - String! # - String - field_type = field_type.of_type while field_type.respond_to?(:of_type) + field_type = field_type.of_type while field_type.respond_to?(:of_type) field_type end diff --git a/spec/support/helpers/login_helpers.rb b/spec/support/helpers/login_helpers.rb index 87cfb6c04dc..3fee6872498 100644 --- a/spec/support/helpers/login_helpers.rb +++ b/spec/support/helpers/login_helpers.rb @@ -157,7 +157,7 @@ module LoginHelpers env['omniauth.error.strategy'] = strategy end - def stub_omniauth_saml_config(messages, context: Rails.application) + def stub_omniauth_saml_config(messages, context: Rails.application) set_devise_mapping(context: context) routes = Rails.application.routes routes.disable_clear_and_finalize = true diff --git a/spec/support/redis/redis_shared_examples.rb b/spec/support/redis/redis_shared_examples.rb index e650a176041..a8b00004fe7 100644 --- a/spec/support/redis/redis_shared_examples.rb +++ b/spec/support/redis/redis_shared_examples.rb @@ -1,7 +1,7 @@ RSpec.shared_examples "redis_shared_examples" do include StubENV - let(:test_redis_url) { "redis://redishost:#{redis_port}"} + let(:test_redis_url) { "redis://redishost:#{redis_port}"} before do stub_env(environment_config_file_name, Rails.root.join(config_file_name)) @@ -76,7 +76,7 @@ RSpec.shared_examples "redis_shared_examples" do context 'when yml file with env variable' do let(:config_file_name) { config_with_environment_variable_inside } - before do + before do stub_env(config_env_variable_url, test_redis_url) end diff --git a/spec/support/shared_examples/malicious_regexp_shared_examples.rb b/spec/support/shared_examples/malicious_regexp_shared_examples.rb index 65026f1d7c0..db69b75c0c8 100644 --- a/spec/support/shared_examples/malicious_regexp_shared_examples.rb +++ b/spec/support/shared_examples/malicious_regexp_shared_examples.rb @@ -1,7 +1,7 @@ require 'timeout' shared_examples 'malicious regexp' do - let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } + let(:malicious_text) { 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa!' } let(:malicious_regexp) { '(?i)^(([a-z])+.)+[A-Z]([a-z])+$' } it 'takes under a second' do diff --git a/spec/support/shared_examples/mentionable_shared_examples.rb b/spec/support/shared_examples/mentionable_shared_examples.rb index 1685decbe94..1226841f24c 100644 --- a/spec/support/shared_examples/mentionable_shared_examples.rb +++ b/spec/support/shared_examples/mentionable_shared_examples.rb @@ -8,8 +8,8 @@ shared_context 'mentionable context' do let(:project) { subject.project } let(:author) { subject.author } - let(:mentioned_issue) { create(:issue, project: project) } - let!(:mentioned_mr) { create(:merge_request, source_project: project) } + let(:mentioned_issue) { create(:issue, project: project) } + let!(:mentioned_mr) { create(:merge_request, source_project: project) } let(:mentioned_commit) { project.commit("HEAD~1") } let(:ext_proj) { create(:project, :public, :repository) } diff --git a/spec/support/shared_examples/url_validator_examples.rb b/spec/support/shared_examples/url_validator_examples.rb index b4757a70984..1f7e2f7ff79 100644 --- a/spec/support/shared_examples/url_validator_examples.rb +++ b/spec/support/shared_examples/url_validator_examples.rb @@ -1,5 +1,5 @@ RSpec.shared_examples 'url validator examples' do |protocols| - let(:validator) { described_class.new(attributes: [:link_url], **options) } + let(:validator) { described_class.new(attributes: [:link_url], **options) } let!(:badge) { build(:badge, link_url: 'http://www.example.com') } subject { validator.validate_each(badge, :link_url, badge.link_url) } -- cgit v1.2.3