Sha256: 556aaf57b905b801cad10608095d44d1a8fcd2838ce825cf99e0d46bc37f3ad4

Contents?: true

Size: 1.73 KB

Versions: 9

Compression:

Stored size: 1.73 KB

Contents

Given /^the following(?: feature)? file(?: "([^"]*)")?:$/ do |file_name, file_text|
  @test_directory ||= @default_file_directory
  file_name ||= @default_feature_file_name

  File.open("#{@test_directory}/#{file_name}", 'w') { |file|
    file.write(file_text)
  }
end

When /^the file(?: "([^"]*)")? is read$/ do |file_name|
  @parsed_files ||= []
  @test_directory ||= @default_file_directory
  file_name ||= @default_feature_file_name

  @parsed_files << CucumberAnalytics::ParsedFile.new("#{@test_directory}/#{file_name}")
end

When /^the step definition file "([^"]*)" is read$/ do |file_name|
  @test_directory ||= @default_file_directory
  file_name ||= @default_step_file_name

  CucumberAnalytics::World.load_step_file("#{@test_directory}/#{file_name}")
end

When /^parameter delimiters of "([^"]*)" and "([^"]*)"$/ do |left_delimiter, right_delimiter|
  CucumberAnalytics::World.left_delimiter = left_delimiter
  CucumberAnalytics::World.right_delimiter = right_delimiter
end

Given /^a directory "([^"]*)"$/ do |directory_name|
  @test_directory = "#{@default_file_directory}/#{directory_name}"

  FileUtils.mkdir(@test_directory) unless File.exists?(@test_directory)
end

When /^the directory(?: "([^"]*)")? is read$/ do |directory_name|
  @parsed_directories ||= []
  @test_directory = "#{@default_file_directory}/#{directory_name}" if directory_name

  @parsed_directories << CucumberAnalytics::ParsedDirectory.new(@test_directory)
end

When /^the following step definition file(?: "([^"]*)")?:$/ do |file_name, file_text|
  @test_directory ||= @default_file_directory
  file_name ||= @default_step_file_name

  File.open("#{@test_directory}/#{file_name}", 'w') { |file|
    file.write(file_text)
  }
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
cucumber_analytics-0.0.9 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.8 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.7 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.6 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.5 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.4 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.3 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.2 features/step_definitions/setup_steps.rb
cucumber_analytics-0.0.1 features/step_definitions/setup_steps.rb