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 0dba8fe commit 3d58d06Copy full SHA for 3d58d06
spec/octofacts_updater/fixture_spec.rb
@@ -177,7 +177,15 @@
177
obj.write_file(outfile)
178
179
expect(File.file?(outfile)).to eq(true)
180
- expect(File.read(outfile)).to eq(File.read(fixture_file))
+
181
+ # Different ruby versions or environments can cause the YAML generation to be slightly different.
182
+ # For example we ran into this diff:
183
+ # - uuid: 09809809-0980-0980-0980-098098098098
184
+ # + uuid: '09809809-0980-0980-0980-098098098098'
185
+ # To avoid this parse the YAML and compare that instead.
186
+ fixture_yaml = YAML.safe_load(File.read(fixture_file))
187
+ generated_yaml = YAML.safe_load(File.read(outfile))
188
+ expect(generated_yaml).to eq(fixture_yaml)
189
end
190
191
0 commit comments