Rafactor glance api to merge defaults
This code cleanup simplifies one the tests by merging the specified params over the defaults instead of returning either the defaults or the specified params.
This commit is contained in:
parent
7ba954f324
commit
972fefaea6
|
@ -41,8 +41,9 @@ describe 'glance::api' do
|
|||
].each do |param_set|
|
||||
|
||||
describe "when #{param_set == {} ? "using default" : "specifying"} class parameters" do
|
||||
|
||||
let :param_hash do
|
||||
param_set == {} ? default_params : params
|
||||
default_params.merge(param_set)
|
||||
end
|
||||
|
||||
let :params do
|
||||
|
|
Loading…
Reference in New Issue