spec/unit/exceptions_spec.rb in chef-11.4.4 vs spec/unit/exceptions_spec.rb in chef-11.6.0.hotfix.1

- old
+ new

@@ -1,8 +1,9 @@ # # Author:: Thomas Bishop (<bishop.thomas@gmail.com>) # Author:: Christopher Walters (<cw@opscode.com>) +# Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>) # Copyright:: Copyright (c) 2010 Thomas Bishop # Copyright:: Copyright (c) 2010 Opscode, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -60,10 +61,14 @@ Chef::Exceptions::GroupIDNotFound => ArgumentError, Chef::Exceptions::InvalidResourceReference => RuntimeError, Chef::Exceptions::ResourceNotFound => RuntimeError, Chef::Exceptions::InvalidResourceSpecification => ArgumentError, Chef::Exceptions::SolrConnectionError => RuntimeError, - Chef::Exceptions::InvalidDataBagPath => ArgumentError + Chef::Exceptions::InvalidDataBagPath => ArgumentError, + Chef::Exceptions::InvalidEnvironmentPath => ArgumentError, + Chef::Exceptions::EnvironmentNotFound => RuntimeError, + Chef::Exceptions::InvalidVersionConstraint => ArgumentError, + Chef::Exceptions::IllegalVersionConstraint => NotImplementedError } exception_to_super_class.each do |exception, expected_super_class| it "should have an exception class of #{exception} which inherits from #{expected_super_class}" do lambda{ raise exception }.should raise_error(expected_super_class)