diff options
Diffstat (limited to 'spec/unit/mixin/params_validate_spec.rb')
-rw-r--r-- | spec/unit/mixin/params_validate_spec.rb | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/spec/unit/mixin/params_validate_spec.rb b/spec/unit/mixin/params_validate_spec.rb index 38e3ba742e..dcee123982 100644 --- a/spec/unit/mixin/params_validate_spec.rb +++ b/spec/unit/mixin/params_validate_spec.rb @@ -63,7 +63,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => String, }, - }, + } ) }.not_to raise_error @@ -74,7 +74,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => Array, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -87,7 +87,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => true, }, - }, + } ) }.not_to raise_error @@ -98,7 +98,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => true, }, - }, + } ) }.to raise_error(ArgumentError) @@ -109,7 +109,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :required => false, }, - }, + } ) }.not_to raise_error end @@ -122,7 +122,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => "validate", }, - }, + } ) }.not_to raise_error @@ -133,7 +133,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => "monkey", }, - }, + } ) }.to raise_error(ArgumentError) end @@ -146,7 +146,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => %w{validate music}, }, - }, + } ) }.not_to raise_error @@ -157,7 +157,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :respond_to => %w{monkey validate}, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -168,7 +168,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :default => "is the loneliest number", }, - },) + }) expect(arguments[:one]).to eq("is the loneliest number") end @@ -180,7 +180,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :regex => /^is good$/, }, - }, + } ) }.not_to raise_error @@ -191,7 +191,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :regex => /^is bad$/, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -208,7 +208,7 @@ describe Chef::Mixin::ParamsValidate do }, }, }, - }, + } ) }.not_to raise_error @@ -223,7 +223,7 @@ describe Chef::Mixin::ParamsValidate do }, }, }, - }, + } ) }.to raise_error(ArgumentError) end @@ -250,7 +250,7 @@ describe Chef::Mixin::ParamsValidate do :required => false, }, :three => { :default => "neato mosquito" }, - }, + } ) }.not_to raise_error expect(args[:three]).to eq("neato mosquito") @@ -274,7 +274,7 @@ describe Chef::Mixin::ParamsValidate do :required => false, }, :three => { :default => "neato mosquito" }, - }, + } ) }.to raise_error(ArgumentError) end @@ -286,7 +286,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :busted => "check", }, - }, + } ) }.to raise_error(ArgumentError) end @@ -305,7 +305,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.not_to raise_error expect { @@ -315,7 +315,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.not_to raise_error expect { @@ -325,7 +325,7 @@ describe Chef::Mixin::ParamsValidate do :one => { :kind_of => [ String, Array ], }, - }, + } ) }.to raise_error(ArgumentError) end |