flowerbox-delivery/features/step_definitions/given/i_have_file.rb
2012-01-23 11:58:20 -05:00

6 lines
178 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