Sha256: 232486119bc218c84aec099c8d0143664bdbdb633a7fbdd554fb3f03178af55f

Contents?: true

Size: 860 Bytes

Versions: 2

Compression:

Stored size: 860 Bytes

Contents

# encoding: utf-8
Given(/^a configuration file named "([^"]*?)" with:$/) do |file, table|
  result = []
  result << '---'

  with_environment 'HOME' => working_directory do
    table.hashes.each do |r|
      r['value'] = ::File.expand_path(r['value']) if r['option'].split(/ /).include? 'resolve_path'
      result << "#{r['parameter']}: #{r['value']}"
    end
  end

  write_file(file, result.join("\n"))
end

Given(/^a repository named "(.*?)" with$/) do |repository, table|
  repository = GitRepository.create File.join(current_dir, repository)

  table.hashes.each do |r|
    repository.add_content r[:path], r[:content]
  end
end

Then(/^a repository named "(.*?)" should exist$/) do |repository|
  in_current_dir do
    with_environment 'HOME' => working_directory do
      expect(File.exist? File.expand_path(repository)).to be_truthy
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
proxy_tester-0.1.10 features/step_definitions.rb
proxy_tester-0.1.8 features/step_definitions.rb