File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 80
80
let ( :json ) { '{"key":"value", {"ķęŷ":"νậŀųề" }, {"キー":"値" }' }
81
81
82
82
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 )
84
84
expect ( PSON ) . to receive ( :load ) . with ( json ) . and_return ( data ) . once
85
85
is_expected . to run . with_params ( filename ) . and_return ( data )
86
86
}
125
125
let ( :json ) { ',;{"key":"value"}' }
126
126
127
127
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 )
129
129
expect ( PSON ) . to receive ( :load ) . with ( json ) . once . and_raise StandardError , 'Something terrible have happened!'
130
130
is_expected . to run . with_params ( filename , 'default' => 'value' ) . and_return ( 'default' => 'value' )
131
131
}
137
137
end
138
138
139
139
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'
141
141
is_expected . to run . with_params ( filename , 'default' => 'value' ) . and_return ( 'default' => 'value' )
142
142
}
143
143
end
You can’t perform that action at this time.
0 commit comments