Browse Source

Consolidate shared `a scope` example parts into one attributes check (#32046)

dariusk-working/4_3_0
Matt Jankowski 1 year ago committed by GitHub
parent
commit
c2ef83ea4c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 17
      spec/lib/scope_transformer_spec.rb

17
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

Loading…
Cancel
Save