diff options
Diffstat (limited to 'spec/functional/file_content_management/deploy_strategies_spec.rb')
-rw-r--r-- | spec/functional/file_content_management/deploy_strategies_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/functional/file_content_management/deploy_strategies_spec.rb b/spec/functional/file_content_management/deploy_strategies_spec.rb index 846f116867..0c58677ba5 100644 --- a/spec/functional/file_content_management/deploy_strategies_spec.rb +++ b/spec/functional/file_content_management/deploy_strategies_spec.rb @@ -20,6 +20,15 @@ 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 @@ -146,7 +155,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) - IO.binread(target_file_path).should == staging_file_content + binread(target_file_path).should == staging_file_content end context "when the owner of the target file is not the owner of the staging file", :requires_root do |