summaryrefslogtreecommitdiff
path: root/spec/unit/provider/file/content_spec.rb
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2016-02-09 07:53:56 -0800
committerLamont Granquist <lamont@scriptkiddie.org>2016-02-09 07:53:56 -0800
commitf073747786abbe6ada55ed24b696a03e39c3c45d (patch)
tree7971d871e89d522a58291713761a6c83f68e8d19 /spec/unit/provider/file/content_spec.rb
parentc6e69783705cfd48bfea0c943dc071964dd21311 (diff)
downloadchef-f073747786abbe6ada55ed24b696a03e39c3c45d.tar.gz
auto fixing some rubocops
Style/NegatedWhile Style/ParenthesesAroundCondition Style/WhileUntilDo Style/WordArray Performance/ReverseEach Style/ColonMethodCall
Diffstat (limited to 'spec/unit/provider/file/content_spec.rb')
-rw-r--r--spec/unit/provider/file/content_spec.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/unit/provider/file/content_spec.rb b/spec/unit/provider/file/content_spec.rb
index ebef4faa09..9ebcf10dcc 100644
--- a/spec/unit/provider/file/content_spec.rb
+++ b/spec/unit/provider/file/content_spec.rb
@@ -66,13 +66,13 @@ describe Chef::Provider::File::Content do
it "returns a tempfile in the tempdir when :file_staging_uses_destdir is not set" do
Chef::Config[:file_staging_uses_destdir] = false
- expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be_truthy
+ expect(content.tempfile.path.start_with?(Dir.tmpdir)).to be_truthy
expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
end
it "returns a tempfile in the destdir when :file_deployment_uses_destdir is set" do
Chef::Config[:file_staging_uses_destdir] = true
- expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be_falsey
+ expect(content.tempfile.path.start_with?(Dir.tmpdir)).to be_falsey
expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_truthy
end
@@ -83,7 +83,7 @@ describe Chef::Provider::File::Content do
it "returns a tempfile in the tempdir when :file_deployment_uses_destdir is set to :auto" do
Chef::Config[:file_staging_uses_destdir] = :auto
- expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be_truthy
+ expect(content.tempfile.path.start_with?(Dir.tmpdir)).to be_truthy
expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
end
@@ -93,7 +93,7 @@ describe Chef::Provider::File::Content do
end
it "returns a tempfile in the tempdir when :file_desployment_uses_destdir is not set" do
- expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be_truthy
+ expect(content.tempfile.path.start_with?(Dir.tmpdir)).to be_truthy
expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
end
end