diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /spec/rubocop/qa_helpers_spec.rb | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'spec/rubocop/qa_helpers_spec.rb')
-rw-r--r-- | spec/rubocop/qa_helpers_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/rubocop/qa_helpers_spec.rb b/spec/rubocop/qa_helpers_spec.rb index 051817903a8..cf6d2f1a845 100644 --- a/spec/rubocop/qa_helpers_spec.rb +++ b/spec/rubocop/qa_helpers_spec.rb @@ -6,7 +6,7 @@ require 'parser/current' require_relative '../../rubocop/qa_helpers' RSpec.describe RuboCop::QAHelpers do - def parse_source(source, path = 'foo.rb') + def build_and_parse_source(source, path = 'foo.rb') buffer = Parser::Source::Buffer.new(path) buffer.source = source @@ -24,13 +24,13 @@ RSpec.describe RuboCop::QAHelpers do describe '#in_qa_file?' do it 'returns true for a node in the qa/ directory' do - node = parse_source('10', rails_root_join('qa', 'qa', 'page', 'dashboard', 'groups.rb')) + node = build_and_parse_source('10', rails_root_join('qa', 'qa', 'page', 'dashboard', 'groups.rb')) expect(cop.in_qa_file?(node)).to eq(true) end it 'returns false for a node outside the qa/ directory' do - node = parse_source('10', rails_root_join('app', 'foo', 'foo.rb')) + node = build_and_parse_source('10', rails_root_join('app', 'foo', 'foo.rb')) expect(cop.in_qa_file?(node)).to eq(false) end |