String and boolean types were compared.
Had to adapt the tests which checked for booleans, when in
reality strings where present.
# Convert booleans removing the previous cludge we did
known_booleans.each do |bool|
if hash[bool] != nil then
- if hash[bool] == "true" then
- hash[bool] = true
- else
+ unless hash[bool] == "true" then
raise "Parser error: #{bool} was meant to be a boolean but received value: #{hash[bool]}."
end
end
# Iterate across each parameter, creating an example for comparison
data[:params].each do |param_name, param_value|
it "the parameter '#{param_name.to_s}' should match #{param_value.inspect}" do
- resource[param_name].should == data[:params][param_name]
+ # booleans get cludged to string "true"
+ if param_value == true then
+ resource[param_name].should == "true"
+ else
+ resource[param_name].should == data[:params][param_name]
+ end
end
end
end