Sha256: 5f0177593976e0f5d39b86d55aabba8a2a81dcd131f0a36d04ef747c22ec7c5e

Contents?: true

Size: 761 Bytes

Versions: 28

Compression:

Stored size: 761 Bytes

Contents

include FileUtils

FILES = %w(image.jpg document.pdf)

def create(path)
  base_directory   = File.dirname(path)
  assets_directory = File.basename(path)

  # Delete and create the path
  Dir.chdir base_directory do
    rm_rf assets_directory
    mkdir assets_directory
  end
end

Given(/^a path with some files at "(.*?)" to be synced at "(.*?)"$/) do |from_path, to_path|
  create from_path
  create to_path

  # Create test assets to be used for syncing
  Dir.chdir from_path do
  	FILES.each { |_| touch _ }
  end
end

Then(/^the assets should be synced out in the directory "(.*?)"$/) do |sync_to_path|
  File.exist?(sync_to_path).should == true

  Dir.chdir sync_to_path do
    FILES.each do |file|
      File.exist?(file).should == true
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
karo-2.5.2 features/step_definitions/karo_steps.rb
karo-2.5.1 features/step_definitions/karo_steps.rb
karo-2.5.0 features/step_definitions/karo_steps.rb
karo-2.4.0 features/step_definitions/karo_steps.rb
karo-2.3.9 features/step_definitions/karo_steps.rb
karo-2.3.8 features/step_definitions/karo_steps.rb
karo-2.3.7 features/step_definitions/karo_steps.rb
karo-2.3.6 features/step_definitions/karo_steps.rb
karo-2.3.5 features/step_definitions/karo_steps.rb
karo-2.3.4 features/step_definitions/karo_steps.rb
karo-2.3.3 features/step_definitions/karo_steps.rb
karo-2.3.2 features/step_definitions/karo_steps.rb
karo-2.3.1 features/step_definitions/karo_steps.rb
karo-2.3.0 features/step_definitions/karo_steps.rb
karo-2.2.1 features/step_definitions/karo_steps.rb
karo-2.2.0 features/step_definitions/karo_steps.rb
karo-2.1.3 features/step_definitions/karo_steps.rb
karo-2.1.2 features/step_definitions/karo_steps.rb
karo-2.1.1 features/step_definitions/karo_steps.rb
karo-2.1.0 features/step_definitions/karo_steps.rb