Sha256: d6c158164f4ba71a62f1a1e8384f107cce36e23dfb3b683cdf6553c751328b67

Contents?: true

Size: 1.45 KB

Versions: 5

Compression:

Stored size: 1.45 KB

Contents

Given 'a lockfile with:' do |content|
  steps %Q{
    Given a file named "#{path_for_step(expand_path('.').to_lockfile_path)}" with:
      """
      #{expand(content)}
      """
  }
end

Given 'an old name lockfile with:' do |content|
  steps %Q{
    Given a file named "#{path_for_step("#{expand_path('.')}/VimFlavor.lock")}" with:
      """
      #{expand(content)}
      """
  }
end

Given 'I copy a new lockfile from another machine with:' do |content|
  steps %Q{
    Given a lockfile with:
      """
      #{content}
      """
  }
end

Given 'I delete the lockfile' do
  steps %Q{
    Given I remove the file "#{path_for_step(expand_path('.').to_lockfile_path)}"
  }
end

When 'I edit the lockfile as:' do |content|
  steps %Q{
    Given a lockfile with:
      """
      #{content}
      """
  }
end

Then /^(?:a|the) lockfile is (?:created|updated) with:$/ do |content|
  # For some reason, Cucumber drops the last newline from every docstring...
  steps %Q{
    Then the file "#{path_for_step(expand_path('.').to_lockfile_path)}" should contain exactly:
      """
      #{content == '' ? '' : expand(content) + "\n"}
      """
  }
end

Then /^(?:a|the) lockfile is (?:created|updated) and matches with:$/ do |content|
  expect(path_for_step(expand_path('.').to_lockfile_path)).to have_file_content(/#{content}/)
end

Then /^(?:a|the) lockfile is not created$/ do
  steps %Q{
    Then a file named "#{path_for_step(expand_path('.').to_lockfile_path)}" should not exist
  }
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
vim-flavor-4.0.3 features/step_definitions/lockfile_steps.rb
vim-flavor-4.0.2 features/step_definitions/lockfile_steps.rb
vim-flavor-4.0.1 features/step_definitions/lockfile_steps.rb
vim-flavor-4.0.0 features/step_definitions/lockfile_steps.rb
vim-flavor-3.0.0 features/step_definitions/lockfile_steps.rb