Sha256: c8ec773da60514a93ba3fdf2a183cf0e78c4be37ec44bdf218880f0b1704cb72
Contents?: true
Size: 824 Bytes
Versions: 7
Compression:
Stored size: 824 Bytes
Contents
Given /^(?:a|the) directory "([^"]*)"$/ do |directory_name| @test_directory = "#{@default_file_directory}/#{directory_name}" FileUtils.mkdir(@test_directory) unless File.exists?(@test_directory) end And(/^(?:a|the) file "([^"]*)"$/) do |file_name| file_path = "#{@default_file_directory}/#{file_name}" # Some versions of Gherkin require feature content to be present in feature files if file_name =~ /\.feature/ File.open(file_path, 'w') { |file| file.write('Feature:') } else FileUtils.touch(file_path) end end And(/^the file "([^"]*)":$/) do |file_name, file_text| file_path = "#{@default_file_directory}/#{file_name}" File.open(file_path, 'w') { |file| file.write(file_text) } end Given(/^the following gherkin:$/) do |text| @source_text = text end
Version data entries
7 entries across 7 versions & 1 rubygems