From 2112153b8540c232ce40f14c320d4ef05cc51132 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 18 Apr 2012 15:49:08 -0400 Subject: [PATCH] fix spec --- spec/lib/penchant/gemfile_spec.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spec/lib/penchant/gemfile_spec.rb b/spec/lib/penchant/gemfile_spec.rb index d851d7b..fe2bb87 100644 --- a/spec/lib/penchant/gemfile_spec.rb +++ b/spec/lib/penchant/gemfile_spec.rb @@ -10,6 +10,8 @@ describe Penchant::Gemfile do let(:gemfile_erb_path) { File.join(dir, 'Gemfile.erb') } def write_file(path, content = nil) + FileUtils.mkdir_p(File.dirname(path)) + File.open(path, 'wb') do |fh| content = yield if block_given? fh.print content