Sha256: df42d40a91e5fd5e471cf8661a48174e68eada0d76717596f0f6fd1eb17408c3

Contents?: true

Size: 1.14 KB

Versions: 6

Compression:

Stored size: 1.14 KB

Contents

require 'tempfile'
require 'fileutils'

When /^I get help for "([^"]*)"$/ do |app_name|
  @app_name = app_name
  step %(I run `#{app_name} help`)
end

Given(/^the file "(.*?)" contains:$/) do |filename, contents|
  FileUtils.chdir "tmp/aruba" do
    @files_created << filename
    File.open(filename,'w') do |file|
      file.puts contents
    end
  end
end

Given(/^this config file:$/) do |string|
  FileUtils.chdir "tmp/aruba" do
    @files_created << "config.json"
    File.open("config.json",'w') do |file|
      file.puts string
    end
  end
end

Given(/^a git repo "(.*?)" in "(.*?)" containing the file "(.*?)" and a tag "(.*?)"$/) do |repo_name, repo_basedir, file_name, tag_name|
  FileUtils.chdir "tmp/aruba" do
    FileUtils.mkdir repo_basedir
    @dirs_created << repo_basedir
    FileUtils.chdir repo_basedir do
      FileUtils.mkdir repo_name
      FileUtils.chdir repo_name do
        File.open(file_name,'w') do |file|
          file.puts "Some stuff and whatnot"
        end
        system "git init"
        system "git add #{file_name}"
        system "git commit -m 'initial'"
        system "git tag #{tag_name}"
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bookingit-0.5.0 features/step_definitions/bookinggit_steps.rb
bookingit-0.4.1 features/step_definitions/bookinggit_steps.rb
bookingit-0.4.0 features/step_definitions/bookinggit_steps.rb
bookingit-0.3.0 features/step_definitions/bookinggit_steps.rb
bookingit-0.2.0 features/step_definitions/bookinggit_steps.rb
bookingit-0.1.0 features/step_definitions/bookinggit_steps.rb