Skip to content

Commit efc0d97

Browse files
authored
Merge pull request #81 from bastelfreak/errorrrrr
Adjust test for different formatting on Ruby 3.4
2 parents d87bb91 + 3451640 commit efc0d97

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/unit/functions/join_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@
2424
end
2525

2626
it 'does not flatten arrays nested in hashes' do
27-
expect(compile_to_catalog("notify { join([1,2,{a => [3,4]}]): }")).to have_resource('Notify[12{"a"=>[3, 4]}]')
27+
if Gem::Requirement.create(['>= 3.4.0']).satisfied_by?(Gem::Version.new(RUBY_VERSION.dup))
28+
expect(compile_to_catalog("notify { join([1,2,{a => [3,4]}]): }")).to have_resource('Notify[12{"a" => [3, 4]}]')
29+
else
30+
expect(compile_to_catalog("notify { join([1,2,{a => [3,4]}]): }")).to have_resource('Notify[12{"a"=>[3, 4]}]')
31+
end
2832
end
2933

3034
it 'formats nil/undef as empty string' do

0 commit comments

Comments
 (0)