From af491823bb63f45c2910113c62603946debdfd70 Mon Sep 17 00:00:00 2001 From: ddavison Date: Wed, 11 Sep 2019 16:25:18 -0700 Subject: Fix context naming and failing spec --- spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.2.1