diff options
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 |