You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Unit tests that involve checking CRLF line endings fail when \r\n is used. Yet... using pry to inspect suggests the tests should pass.
casefacts[:kernel]when'windows'is_expected.tocontain_file('C:/example/conf/dir/conf.yaml').with(ensure: 'file',# content: "# This file is managed by Puppet\r\n---\r\nname: value\r\n",content: %r{---\r\n},)
failed: rspec: ./spec/classes/lineendings_spec.rb:9: expected that the catalogue would contain File[C:/example/conf/dir/conf.yaml] with content set to /---\r\n/ but it is set to "# This file is managed by Puppet\r\n---\r\nname: value\r\n"
Hi @ragnarkon, this error was in the version of rspec-puppet bundled in PDK 1.7.1 (rspec-puppet 2.7.1). rspec-puppet 2.7.2 was released to fix this issue and was included in PDK 1.8.0.
Describe the bug
Unit tests that involve checking CRLF line endings fail when
\r\n
is used. Yet... usingpry
to inspect suggests the tests should pass.These tests are being ran against the
content
parameter on file resources.To Reproduce
While attempting to track down the issue, I creating a test module that was used to reliably reproduce the issue on several machines:
https://github.com/ragnarkon/puppet-lineendings
Expected behavior
Unit tests should pass correctly.
Additional context
Test fail reliably on the following machines:
The text was updated successfully, but these errors were encountered: