Sha256: 06e46e668454de07e2c4f30d9afb7d22ffbd96f97e9a9a727cfba5c5a8ecefb5

Contents?: true

Size: 895 Bytes

Versions: 7

Compression:

Stored size: 895 Bytes

Contents

def awetestlib_cucumber_setup
  if ARGV[1].nil?
    @proj_dir = "sample_cucumber"
  else
    @proj_dir = ARGV[1]
  end

  @cucumber_dir = File.join(FileUtils.pwd, @proj_dir)
  @source_dir = File.join(File.dirname(__FILE__), '..', 'setup_samples', 'sample_cucumber')

  if File.exists?(@cucumber_dir)
    puts "Cucumber project directory already exists."
    exit 1
  end

  msg("Question") do
    puts "I'm about to create a cucumber project named #{@proj_dir} in this directory"
    puts "Please hit return to confirm that's what you want."
    puts "NOTE: You may need to run this command as an administrator."
  end
  exit 2 unless STDIN.gets.chomp == ''
  FileUtils.cp_r(@source_dir, @cucumber_dir)
  msg("Info") do
    puts "Configuring files and settings"
    puts "From the sample_cucumber/features folder, you may now run command below:"
    puts "cucumber yahoo_mail.feature"
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
awetestlib-0.1.28 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.27 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.26 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.25 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.24 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.23 bin/awetestlib-cucumber-setup.rb
awetestlib-0.1.22 bin/awetestlib-cucumber-setup.rb