We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f80b94d commit a191e18Copy full SHA for a191e18
spec/unit/outputter/human_spec.rb
@@ -273,7 +273,15 @@
273
274
it "prints empty results from a plan" do
275
outputter.print_plan_result(Bolt::PlanResult.new([], 'success'))
276
- expect(output.string).to eq("[]\n")
+ # json 2.8 changed the array/hash formatting. Ruby 3.0 ships json 2.8+, Ruby 2.7 has an older version
277
+ # interestingly, in openvox the default is the old behaviour, in bolt it's the new behaviour
278
+ # https://github.com/OpenVoxProject/puppet/pull/132
279
+ major_version = RUBY_VERSION.split('.').first.to_i
280
+ if major_version == 2
281
+ expect(output.string).to eq("[\n\n]\n")
282
+ else
283
+ expect(output.string).to eq("[]\n")
284
+ end
285
end
286
287
it "formats unwrapped ExecutionResult from a plan" do
0 commit comments