test/unit/defaults_test.rb in hammer_cli-3.7.0 vs test/unit/defaults_test.rb in hammer_cli-3.8.0
- old
+ new
@@ -24,24 +24,24 @@
end
it "Should update dashed default when underscored default is set" do
defaults_result = @defaults.add_defaults_to_conf({"location-id"=> 3}, nil)
assert_equal '3', defaults_result[:defaults][:'location-id'][:value]
- assert_equal nil, defaults_result[:defaults][:location_id]
+ assert_nil defaults_result[:defaults][:location_id]
end
context "dashed" do
let(:filepath) { File.join(File.dirname(__FILE__), '/fixtures/defaults/defaults_dashed.yml') }
it "Should update underscored default when dashed default is set" do
defaults_result = @defaults.add_defaults_to_conf({"location_id"=> 3}, nil)
assert_equal '3', defaults_result[:defaults][:location_id][:value]
- assert_equal nil, defaults_result[:defaults][:'location-id']
+ assert_nil defaults_result[:defaults][:'location-id']
end
it "should update underscored default with option syntax when dashed default is set" do
defaults_result = @defaults.add_defaults_to_conf({"--location-id"=> 3}, nil)
assert_equal '3', defaults_result[:defaults][:'location-id'][:value]
- assert_equal nil, defaults_result[:defaults][:location_id]
+ assert_nil defaults_result[:defaults][:location_id]
end
end
it "Should add a default param to defaults file, with provider" do
defaults_result = @defaults.add_defaults_to_conf({"location_id"=>nil}, :foreman)