flowerbox-delivery/features/step_definitions/given/i_have_file.rb
2012-01-30 11:34:57 -05:00

7 lines
179 B
Ruby

Given /^I have the file "([^"]*)" with the content:$/ do |filename, string|
FileUtils.mkdir_p File.dirname(filename)
File.open(filename, 'wb') { |fh| fh.print(string) }
end