summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSalim Alam <salam@chef.io>2015-09-30 17:12:25 -0700
committerSalim Alam <salam@chef.io>2015-09-30 17:12:25 -0700
commit8832e75f2d6531b38195f3c8e3a809736788660e (patch)
tree8e9b23bbbf6d4939d78807ea2a15442d5d569feb
parent55f9fe2812a071c09a6a1ae2a6a0e2d2bc89ff5a (diff)
downloadchef-8832e75f2d6531b38195f3c8e3a809736788660e.tar.gz
Get rid of truthy/falsey
-rw-r--r--spec/unit/provider/template/content_spec.rb16
1 files changed, 8 insertions, 8 deletions
diff --git a/spec/unit/provider/template/content_spec.rb b/spec/unit/provider/template/content_spec.rb
index caef3f69fc..925cbdfd6e 100644
--- a/spec/unit/provider/template/content_spec.rb
+++ b/spec/unit/provider/template/content_spec.rb
@@ -86,14 +86,14 @@ describe Chef::Provider::Template::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(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
+ expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be true
+ expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be false
end
it "returns a tempfile in the destdir when :file_staging_uses_destdir is set" do
Chef::Config[:file_staging_uses_destdir] = true
- expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be_falsey
- expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_truthy
+ expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be false
+ expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be true
end
context "when creating a tempfiles in destdir fails" do
@@ -103,8 +103,8 @@ describe Chef::Provider::Template::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(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
+ expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be true
+ expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be false
end
it "fails when :file_desployment_uses_destdir is set" do
@@ -113,8 +113,8 @@ describe Chef::Provider::Template::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(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be_falsey
+ expect(content.tempfile.path.start_with?(Dir::tmpdir)).to be true
+ expect(canonicalize_path(content.tempfile.path).start_with?(enclosing_directory)).to be false
end
end