Sha256: c2ab30e903e311d81192d29d033c531cebc2650f33a7abada67574c0af4bbcc8

Contents?: true

Size: 1.24 KB

Versions: 2

Compression:

Stored size: 1.24 KB

Contents

Given 'a mocked git configuration' do
  steps %(
    Given a mocked home directory
    And I run `git config --global user.name Test`
    And I run `git config --global user.email test@example.com`
  )
end

Given 'a remote module repository' do
  steps %(
    Given a directory named "sources"
    And I run `git clone https://github.com/maestrodev/puppet-test sources/puppet-test`
    And a file named "managed_modules.yml" with:
      """
      ---
        - puppet-test
      """
  )
  write_file('modulesync.yml', <<-CONFIG)
---
  namespace: sources
  git_base: file://#{expand_path('.')}/
  CONFIG
end

Given /a remote module repository with "(.+?)" as the default branch/ do |branch| # rubocop:disable Lint/AmbiguousRegexpLiteral
  steps %(
    Given a directory named "sources"
    And I run `git clone --mirror https://github.com/maestrodev/puppet-test sources/puppet-test`
    And a file named "managed_modules.yml" with:
      """
      ---
        - puppet-test
      """
  )
  write_file('modulesync.yml', <<-CONFIG)
---
  namespace: sources
  git_base: file://#{expand_path('.')}/
  CONFIG
  cd('sources/puppet-test') do
    steps %(
      And I run `git branch -M master #{branch}`
      And I run `git symbolic-ref HEAD refs/heads/#{branch}`
    )
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
modulesync-0.10.0 features/step_definitions/git_steps.rb
modulesync-0.9.0 features/step_definitions/git_steps.rb