Consolidate shared a scope
example parts into one attributes check (#32046)
This commit is contained in:
parent
c3b6a7a297
commit
c2ef83ea4c
1 changed files with 7 additions and 10 deletions
|
@ -7,16 +7,13 @@ RSpec.describe ScopeTransformer do
|
||||||
subject { described_class.new.apply(ScopeParser.new.parse(input)) }
|
subject { described_class.new.apply(ScopeParser.new.parse(input)) }
|
||||||
|
|
||||||
shared_examples 'a scope' do |namespace, term, access|
|
shared_examples 'a scope' do |namespace, term, access|
|
||||||
it 'parses the term' do
|
it 'parses the attributes' do
|
||||||
expect(subject.term).to eq term
|
expect(subject)
|
||||||
end
|
.to have_attributes(
|
||||||
|
term: term,
|
||||||
it 'parses the namespace' do
|
namespace: namespace,
|
||||||
expect(subject.namespace).to eq namespace
|
access: access
|
||||||
end
|
)
|
||||||
|
|
||||||
it 'parses the access' do
|
|
||||||
expect(subject.access).to eq access
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue