diff options
Diffstat (limited to 'spec/unit/environment_spec.rb')
-rw-r--r-- | spec/unit/environment_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/environment_spec.rb b/spec/unit/environment_spec.rb index 2918a9a65e..93b4a5011c 100644 --- a/spec/unit/environment_spec.rb +++ b/spec/unit/environment_spec.rb @@ -454,7 +454,11 @@ describe Chef::Environment do expect do Chef::Environment.load("foo") - end.to raise_error Chef::Exceptions::InvalidEnvironmentPath, "Environment path '/var/chef/environments' is invalid" + end.to raise_error( + an_instance_of(Chef::Exceptions::InvalidEnvironmentPath).and having_attributes( + message: "Environment path '#{windows? ? "C:/var/chef/environments" : "/var/chef/environments"}' is invalid" + ) + ) end it "should raise an error if the file does not exist" do |