mirror of
https://github.com/inspec/inspec
synced 2024-11-21 20:23:06 +00:00
UNIT_TESTS: update yaml reporter test for Ruby 3+
Signed-off-by: Marijus Ravickas <marijus.ravickas@gmail.com>
This commit is contained in:
parent
79f11561fb
commit
1d672feca4
3 changed files with 7 additions and 3 deletions
|
@ -139,6 +139,10 @@ def expect_deprecation(group, &block)
|
|||
handle_deprecations(group => :expect_something, all_others: :tolerate, &block)
|
||||
end
|
||||
|
||||
def darwin?
|
||||
!!(RbConfig::CONFIG["host_os"] =~ /darwin/)
|
||||
end
|
||||
|
||||
class Minitest::Test
|
||||
# TODO: push up to minitest
|
||||
def skip_until(y, m, d, msg)
|
||||
|
|
|
@ -11,10 +11,10 @@ describe Inspec::Reporters::Yaml do
|
|||
|
||||
describe "#render" do
|
||||
it "confirm render output" do
|
||||
if windows? && RUBY3_PLUS
|
||||
# Under Windows on Ruby 3+, empty scalar values are generated without a trailing space
|
||||
if ( windows? || darwin? ) && RUBY3_PLUS
|
||||
# On Ruby 3+, empty scalar values are generated without a trailing space
|
||||
# this affects the title: and desc: fields
|
||||
output = File.read("test/fixtures/reporters/yaml_output_windows_ruby3plus")
|
||||
output = File.read("test/fixtures/reporters/yaml_output_ruby3plus")
|
||||
else
|
||||
output = File.read("test/fixtures/reporters/yaml_output")
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue