Skip to content

Commit 288b669

Browse files
committed
(maint) Fix for loadjson tests
1 parent f1752d8 commit 288b669

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/functions/loadjson_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
let(:json) { '{"key":"value", {"ķęŷ":"νậŀųề" }, {"キー":"値" }' }
8181

8282
it {
83-
expect(OpenURI).to receive(:open_uri).with(filename).and_return(json)
83+
expect(OpenURI).to receive(:open_uri).with(filename, {}).and_return(json)
8484
expect(PSON).to receive(:load).with(json).and_return(data).once
8585
is_expected.to run.with_params(filename).and_return(data)
8686
}
@@ -125,7 +125,7 @@
125125
let(:json) { ',;{"key":"value"}' }
126126

127127
it {
128-
expect(OpenURI).to receive(:open_uri).with(filename).and_return(json)
128+
expect(OpenURI).to receive(:open_uri).with(filename, {}).and_return(json)
129129
expect(PSON).to receive(:load).with(json).once.and_raise StandardError, 'Something terrible have happened!'
130130
is_expected.to run.with_params(filename, 'default' => 'value').and_return('default' => 'value')
131131
}
@@ -137,7 +137,7 @@
137137
end
138138

139139
it {
140-
expect(OpenURI).to receive(:open_uri).with(filename).and_raise OpenURI::HTTPError, '404 File not Found'
140+
expect(OpenURI).to receive(:open_uri).with(filename, {}).and_raise OpenURI::HTTPError, '404 File not Found'
141141
is_expected.to run.with_params(filename, 'default' => 'value').and_return('default' => 'value')
142142
}
143143
end

0 commit comments

Comments
 (0)