summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2018-01-18 10:57:27 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2018-01-18 10:57:50 -0800
commitab202d708839ad58a85b0dff8b5108b1cd890459 (patch)
tree11b7efd434264b87c2634fadee8fd7aec5788955
parentd3f5f8746e0a1cc2f121fb6963b915978192a591 (diff)
downloadchef-ab202d708839ad58a85b0dff8b5108b1cd890459.tar.gz
spec fixes for ruby 2.5
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
-rw-r--r--spec/unit/chef_fs/file_system/repository/directory_spec.rb4
-rw-r--r--spec/unit/deprecated_spec.rb8
2 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/chef_fs/file_system/repository/directory_spec.rb b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
index 6e53e52966..e44cc15167 100644
--- a/spec/unit/chef_fs/file_system/repository/directory_spec.rb
+++ b/spec/unit/chef_fs/file_system/repository/directory_spec.rb
@@ -1,6 +1,6 @@
#
# Author:: Thom May (<thom@chef.io>)
-# Copyright:: Copyright 2012-2016, Chef Software Inc.
+# Copyright:: Copyright 2012-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -152,7 +152,7 @@ describe Chef::ChefFS::FileSystem::Repository::Directory do
end
after do
- FileUtils.rmdir(tmp_dir)
+ FileUtils.rm_rf(tmp_dir)
end
end
diff --git a/spec/unit/deprecated_spec.rb b/spec/unit/deprecated_spec.rb
index 9be792ab20..4eba764b63 100644
--- a/spec/unit/deprecated_spec.rb
+++ b/spec/unit/deprecated_spec.rb
@@ -1,5 +1,5 @@
#
-# Copyright:: Copyright 2013-2016, Chef Software Inc.
+# Copyright:: Copyright 2013-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -29,7 +29,7 @@ describe Chef::Deprecated do
context "loading a deprecation class" do
it "loads the correct class" do
- expect(Chef::Deprecated.create(:test_deprecation)).to be_an_instance_of(Chef::Deprecated::TestDeprecation)
+ expect(Chef::Deprecated.create(:test_deprecation)).to be_an_instance_of(TestDeprecation)
end
it "optionally sets a message" do
@@ -49,11 +49,11 @@ describe Chef::Deprecated do
let(:location) { "the location" }
it "displays the full URL" do
- expect(Chef::Deprecated::TestDeprecation.new().url).to eql("#{base_url}test.html")
+ expect(TestDeprecation.new().url).to eql("#{base_url}test.html")
end
it "formats a complete deprecation message" do
- expect(Chef::Deprecated::TestDeprecation.new(message, location).inspect).to eql("#{message} (CHEF-999)#{location}.\nhttps://docs.chef.io/deprecations_test.html")
+ expect(TestDeprecation.new(message, location).inspect).to eql("#{message} (CHEF-999)#{location}.\nhttps://docs.chef.io/deprecations_test.html")
end
end
end