Sha256: 437a1e773a28b634ee08f47dc21de8f5e68ee681ffbb2d9d849d6edc6d4a21e3
Contents?: true
Size: 471 Bytes
Versions: 15
Compression:
Stored size: 471 Bytes
Contents
Given /^(.+) exists with(\w*) a newline at the end$/ do |file_name, no_newline| file_contents = get_file_contents(file_name) file_contents.should_not be_nil if no_newline.empty? file_contents << "\n" unless file_contents[-1] == "\n" else file_contents[-1] = '' if file_contents[-1] == "\n" end write_file(file_name, file_contents) end Given /^my configuration file "([^"]*)" looks like:$/ do |file_name, string| write_file(file_name, string) end
Version data entries
15 entries across 15 versions & 1 rubygems