diff options
author | danielsdeleo <dan@opscode.com> | 2013-06-14 16:20:40 -0700 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-06-14 17:11:22 -0700 |
commit | 8eb66a3463bb58a96b68dc156551f5772264b725 (patch) | |
tree | 0355d13fa8d3625d0b32dbce706e0486ca62d54b /lib/chef/mixin/template.rb | |
parent | 51d8059bd067f1a67361db3705648e4394c85d84 (diff) | |
download | chef-8eb66a3463bb58a96b68dc156551f5772264b725.tar.gz |
don't depend on line separator in partial tests
In some windows testing environments no line separator conversion is
happening. This may be a function of git settings, or something else in
our test cluster environment. In any case, line separators are
irrelevant to these tests, as they are testing the partial template
feature. We could remove the line endings from the test fixture files,
but editors like vim add hidden newlines at the end of files, so this is
difficult to maintain. Stripping the line endings within the test code
is more sustainable option.
Diffstat (limited to 'lib/chef/mixin/template.rb')
-rw-r--r-- | lib/chef/mixin/template.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/chef/mixin/template.rb b/lib/chef/mixin/template.rb index 54aa65c488..9208ce057e 100644 --- a/lib/chef/mixin/template.rb +++ b/lib/chef/mixin/template.rb @@ -31,7 +31,7 @@ class Chef if IO.respond_to?(:binread) IO.binread(file) else - IO.read(file) + File.open(file, "rb") {|f| f.read } end end |