From c2ef83ea4c045eefe9930b66ea6abe6ddeb31740 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Wed, 25 Sep 2024 03:56:42 -0400 Subject: [PATCH] Consolidate shared `a scope` example parts into one attributes check (#32046) --- spec/lib/scope_transformer_spec.rb | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/spec/lib/scope_transformer_spec.rb b/spec/lib/scope_transformer_spec.rb index 09a31e04c..f4003352e 100644 --- a/spec/lib/scope_transformer_spec.rb +++ b/spec/lib/scope_transformer_spec.rb @@ -7,16 +7,13 @@ RSpec.describe ScopeTransformer do subject { described_class.new.apply(ScopeParser.new.parse(input)) } shared_examples 'a scope' do |namespace, term, access| - it 'parses the term' do - expect(subject.term).to eq term - end - - it 'parses the namespace' do - expect(subject.namespace).to eq namespace - end - - it 'parses the access' do - expect(subject.access).to eq access + it 'parses the attributes' do + expect(subject) + .to have_attributes( + term: term, + namespace: namespace, + access: access + ) end end