Skip to content

Commit 8e9a670

Browse files
committed
(maint) Modifies pending test conditional
An issue with earlier versions of timecop caused the 'when yaml contains Date formatted fields' test to fail with the version of Psych included with Ruby 3.2.0. With the release of timecop 0.9.6, this issue has been resolved and we can remove the test from its conditial pending state when that version of timecop is present.
1 parent d00c301 commit 8e9a670

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spec/custom_facts/util/parser_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,9 @@ def expects_to_parse_powershell(cmd, result)
354354
let(:yaml_content) { load_fixture('external_fact_yaml_date').read }
355355

356356
it 'loads date' do
357-
pending 'There is a bug in newer versions of Psych and Timecop' if RUBY_VERSION =~ /^3\.2/
357+
if RUBY_VERSION.to_f == 3.2 && Gem::Version.new(Timecop::VERSION) < Gem::Version.new('0.9.6')
358+
pending 'There is a bug in newer versions of Psych and timecop'
359+
end
358360
expected_result = { 'testsfact' => { 'date' => Date.parse('2020-04-28') } }
359361

360362
expect(yaml_parser.parse_results).to eq(expected_result)

0 commit comments

Comments
 (0)