summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--spec/rubocop/cop/qa/ambiguous_page_object_name_spec.rb8
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