Sha256: 7dfb9a5aa440c5e09729aea4e8856fb2a22f014e3cdeb367fa349b29cf6343a0

Contents?: true

Size: 858 Bytes

Versions: 15

Compression:

Stored size: 858 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_true
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
proxy_tester-0.1.6 features/step_definitions.rb
proxy_tester-0.1.5 features/step_definitions.rb
proxy_tester-0.1.4 features/step_definitions.rb
proxy_tester-0.1.3 features/step_definitions.rb
proxy_tester-0.1.2 features/step_definitions.rb
proxy_tester-0.1.1 features/step_definitions.rb
proxy_tester-0.1.0 features/step_definitions.rb
proxy_tester-0.0.9 features/step_definitions.rb
proxy_tester-0.0.8 features/step_definitions.rb
proxy_tester-0.0.7 features/step_definitions.rb
proxy_tester-0.0.6 features/step_definitions.rb
proxy_tester-0.0.5 features/step_definitions.rb
proxy_tester-0.0.4 features/step_definitions.rb
proxy_tester-0.0.3 features/step_definitions.rb
proxy_tester-0.0.2 features/step_definitions.rb