diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:41:36 -0800 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-12-06 13:41:36 -0800 |
commit | ea302cfa10d61b90961f7642bd8efd30af1d81a5 (patch) | |
tree | 8340953de04fd094919d618a6ad1a32d8c0c9262 | |
parent | e709132d5bc82145951392b4fed4b2baddde75bd (diff) | |
download | chef-ea302cfa10d61b90961f7642bd8efd30af1d81a5.tar.gz |
helpful spec tests discovered could not change this superclass
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r-- | lib/chef/exceptions.rb | 4 | ||||
-rw-r--r-- | spec/unit/environment_spec.rb | 2 | ||||
-rw-r--r-- | spec/unit/exceptions_spec.rb | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/lib/chef/exceptions.rb b/lib/chef/exceptions.rb index 71ea6ceb9a..3396dd12e3 100644 --- a/lib/chef/exceptions.rb +++ b/lib/chef/exceptions.rb @@ -159,7 +159,7 @@ class Chef # Thrown when Win32 API layer binds to non-existent Win32 function. Occurs # when older versions of Windows don't support newer Win32 API functions. - class Win32APIFunctionNotImplemented < RuntimeError; end + class Win32APIFunctionNotImplemented < RuntimeError; end # rubocop:disable Lint/InheritException # Attempting to run windows code on a not-windows node class Win32NotWindows < RuntimeError; end class WindowsNotAdmin < RuntimeError; end @@ -196,7 +196,7 @@ class Chef class InvalidVersionConstraint < ArgumentError; end # Version constraints are not allowed in chef-solo - class IllegalVersionConstraint < ArgumentError; end + class IllegalVersionConstraint < NotImplementedError; end # rubocop:disable Lint/InheritException class MetadataNotValid < StandardError; end class MetadataNotFound < StandardError diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb index 63c96ad93e..3daae16749 100644 --- a/spec/unit/environment_spec.rb +++ b/spec/unit/environment_spec.rb @@ -295,7 +295,7 @@ describe Chef::Environment do Chef::Config[:solo_legacy_mode] = false end - it "should raise and exception" do + it "should raise an exception" do expect do Chef::Environment.validate_cookbook_version("= 1.2.3.4") end.to raise_error Chef::Exceptions::IllegalVersionConstraint, diff --git a/spec/unit/exceptions_spec.rb b/spec/unit/exceptions_spec.rb index 9c599cac75..e952a5448a 100644 --- a/spec/unit/exceptions_spec.rb +++ b/spec/unit/exceptions_spec.rb @@ -67,7 +67,7 @@ describe Chef::Exceptions do Chef::Exceptions::InvalidEnvironmentPath => ArgumentError, Chef::Exceptions::EnvironmentNotFound => RuntimeError, Chef::Exceptions::InvalidVersionConstraint => ArgumentError, - Chef::Exceptions::IllegalVersionConstraint => RuntimeError, + Chef::Exceptions::IllegalVersionConstraint => NotImplementedError, Chef::Exceptions::RegKeyValuesTypeMissing => ArgumentError, Chef::Exceptions::RegKeyValuesDataMissing => ArgumentError, } |