summaryrefslogtreecommitdiff
path: root/spec/functional
diff options
context:
space:
mode:
authorXabier de Zuazo <xabier@onddo.com>2014-11-27 21:14:56 +0100
committerLamont Granquist <lamont@scriptkiddie.org>2015-01-27 11:59:40 -0800
commitbf58389b53ac27cc2491b8f3d4c3a81ed6fc051e (patch)
tree142c4b8d4f341291056070f9522f65b404ba64fd /spec/functional
parentf445869cfa26b17e22a4266c58907b3619b749ae (diff)
downloadchef-bf58389b53ac27cc2491b8f3d4c3a81ed6fc051e.tar.gz
Remove binread functions (ruby 1.8 specific, issue #2497)
Diffstat (limited to 'spec/functional')
-rw-r--r--spec/functional/file_content_management/deploy_strategies_spec.rb11
1 files changed, 1 insertions, 10 deletions
diff --git a/spec/functional/file_content_management/deploy_strategies_spec.rb b/spec/functional/file_content_management/deploy_strategies_spec.rb
index bcd171eb73..03a6c504c1 100644
--- a/spec/functional/file_content_management/deploy_strategies_spec.rb
+++ b/spec/functional/file_content_management/deploy_strategies_spec.rb
@@ -20,15 +20,6 @@ require 'spec_helper'
shared_examples_for "a content deploy strategy" do
- # Ruby 1.8 has no binread
- def binread(file)
- if IO.respond_to?(:binread)
- IO.binread(file)
- else
- IO.read(file)
- end
- end
-
def normalize_mode(mode_int)
( mode_int & 07777).to_s(8)
end
@@ -160,7 +151,7 @@ shared_examples_for "a content deploy strategy" do
it "updates the target with content from staged" do
content_deployer.deploy(staging_file_path, target_file_path)
- expect(binread(target_file_path)).to eq(staging_file_content)
+ expect(IO.binread(target_file_path)).to eq(staging_file_content)
end
context "when the owner of the target file is not the owner of the staging file", :requires_root do