diff options
author | ddavison <ddavison@gitlab.com> | 2019-09-11 16:25:18 -0700 |
---|---|---|
committer | ddavison <ddavison@gitlab.com> | 2019-09-11 16:29:50 -0700 |
commit | af491823bb63f45c2910113c62603946debdfd70 (patch) | |
tree | d88d99a58da6250e0e774e72a377c9de9d77cefc | |
parent | c3f5cf8ac526d83e4a617553696f3a2f70144ce2 (diff) | |
download | gitlab-ce-qa-ambiguous-page-object-cop.tar.gz |
Fix context naming and failing specqa-ambiguous-page-object-cop
-rw-r--r-- | spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb b/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb index 50a7fe086a8..8ee720af9a5 100644 --- a/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb +++ b/spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb @@ -38,10 +38,16 @@ describe RuboCop::Cop::QA::AmbiguousPageObjectName do end end - context 'outside of a migration spec file' do + context 'outside of a QA file' do + before do + allow(cop).to receive(:in_qa_file?).and_return(false) + end + it "does not register an offense" do expect_no_offenses(<<-RUBY) Page::Object.perform do |page| + page.do_something + end RUBY end end |