File tree Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Expand file tree Collapse file tree 1 file changed +15
-5
lines changed Original file line number Diff line number Diff line change 129129 describe 'when raising NoMethodErrors' do
130130 subject { described_class . new ( :foo , '1.0.0' ) }
131131
132- it 'includes the face name in the error message' do
133- expect { subject . boombaz } . to raise_error ( NoMethodError , /#{ subject . name } / )
134- end
132+ if RUBY_VERSION . to_f >= 3.3
133+ it 'includes the face name in the error message' do
134+ expect { subject . boombaz } . to raise_error ( NoMethodError , /for an instance of Puppet::Interface/ )
135+ end
136+
137+ it 'includes the face version in the error message' do
138+ expect { subject . boombaz } . to raise_error ( NoMethodError , /for an instance of Puppet::Interface/ )
139+ end
140+ else
141+ it 'includes the face name in the error message' do
142+ expect { subject . boombaz } . to raise_error ( NoMethodError , /#{ subject . name } / )
143+ end
135144
136- it 'includes the face version in the error message' do
137- expect { subject . boombaz } . to raise_error ( NoMethodError , /#{ subject . version } / )
145+ it 'includes the face version in the error message' do
146+ expect { subject . boombaz } . to raise_error ( NoMethodError , /#{ subject . version } / )
147+ end
138148 end
139149 end
140150
You can’t perform that action at this time.
0 commit comments