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:
Dan Bode 2012-03-13 15:09:58 -07:00
parent 7ba954f324
commit 972fefaea6
1 changed files with 2 additions and 1 deletions

View File

@ -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