HomeSoftware Heritage

(IAC-1228) Allow File.read to passthrough for JSON spec tests

Description

(IAC-1228) Allow File.read to passthrough for JSON spec tests

In the context of Puppet 7 there are two subsequent calls to
File.read from the catalog generated from the tests of loadjson_spec.rb
and load_module_metadata_spec.rb

Prior to this commit, these calls were causing exceptions from
RSpec as the mock expectations for File.read were being thrown off.

This did not manifest on Puppet 5 or 6.

After this commit, any calls to File.read that do not conform to
the expected arguments we want to mock a response for, are passed
through to File.read.

Details

Provenance
Ciaran McCrisken <ciaran.mccrisken@puppet.com>Authored on Feb 5 2021, 2:40 PM
olasdPushed on Dec 28 2021, 10:47 AM
Parents
rSPSTDb4605c2bbbc7: (IAC-1228) Remove '+' from shell_join_spec test data
Branches
Unknown
Tags
Unknown

Event Timeline

Ciaran McCrisken <ciaran.mccrisken@puppet.com> committed rSPSTDd466e7fcf369: (IAC-1228) Allow File.read to passthrough for JSON spec tests (authored by Ciaran McCrisken <ciaran.mccrisken@puppet.com>).Feb 5 2021, 4:57 PM