File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 1818# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1919# THE SOFTWARE.
2020
21- require 'puppet_x /stdlib'
21+ require_relative '.. /stdlib'
2222require 'date'
2323
2424module PuppetX ::Stdlib
Original file line number Diff line number Diff line change 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 }
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 }
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
You can’t perform that action at this time.
0 commit comments