diff --git a/lib/puppet_x/stdlib/toml_dumper.rb b/lib/puppet_x/stdlib/toml_dumper.rb index a38bdf592..4547d508c 100644 --- a/lib/puppet_x/stdlib/toml_dumper.rb +++ b/lib/puppet_x/stdlib/toml_dumper.rb @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -require 'puppet_x/stdlib' +require_relative '../stdlib' require 'date' module PuppetX::Stdlib diff --git a/spec/functions/loadjson_spec.rb b/spec/functions/loadjson_spec.rb index af841d115..fbfee51d1 100644 --- a/spec/functions/loadjson_spec.rb +++ b/spec/functions/loadjson_spec.rb @@ -80,7 +80,7 @@ let(:json) { '{"key":"value", {"ķęŷ":"νậŀųề" }, {"キー":"値" }' } it { - expect(OpenURI).to receive(:open_uri).with(filename).and_return(json) + expect(OpenURI).to receive(:open_uri).with(filename, {}).and_return(json) expect(PSON).to receive(:load).with(json).and_return(data).once is_expected.to run.with_params(filename).and_return(data) } @@ -125,7 +125,7 @@ let(:json) { ',;{"key":"value"}' } it { - expect(OpenURI).to receive(:open_uri).with(filename).and_return(json) + expect(OpenURI).to receive(:open_uri).with(filename, {}).and_return(json) expect(PSON).to receive(:load).with(json).once.and_raise StandardError, 'Something terrible have happened!' is_expected.to run.with_params(filename, 'default' => 'value').and_return('default' => 'value') } @@ -137,7 +137,7 @@ end it { - expect(OpenURI).to receive(:open_uri).with(filename).and_raise OpenURI::HTTPError, '404 File not Found' + expect(OpenURI).to receive(:open_uri).with(filename, {}).and_raise OpenURI::HTTPError, '404 File not Found' is_expected.to run.with_params(filename, 'default' => 'value').and_return('default' => 'value') } end