Sha256: 61513e3841c9da3b3dd74e0b61f802d60d17ad749adabcb62f91fff3d3841215
Contents?: true
Size: 1009 Bytes
Versions: 3
Compression:
Stored size: 1009 Bytes
Contents
# encoding: UTF-8 Given(/^a (reference|candidate) image for "([^"]*)" with content: "([^"]*)"$/) do |type, component_name, fixture_path| fixture_path = File.join(ENV['PROJECT_ROOT_PATH'], 'fixtures', fixture_path) destination_path = File.join('spec/ui/references/', component_name, 'test_driver', "#{type}.png") rel_destination_path = File.join(current_dir, destination_path) FileUtils.mkdir_p(File.dirname(rel_destination_path)) FileUtils.cp(fixture_path, rel_destination_path) step %Q(a #{type} for "#{component_name}" should exist) end Then(/^a (reference|candidate) for "(.*?)" should not exist$/) do |type, component_name| path = File.join('spec/ui/references/', component_name, 'test_driver', "#{type}.png") step %Q(a file named "#{path}" should not exist) end Then(/^a (reference|candidate) for "(.*?)" should exist$/) do |type, component_name| path = File.join('spec/ui/references/', component_name, 'test_driver', "#{type}.png") step %Q(a file named "#{path}" should exist) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
simulacrum-0.3.2 | features/step_definitions/file_steps.rb |
simulacrum-0.3.1 | features/step_definitions/file_steps.rb |
simulacrum-0.3.0 | features/step_definitions/file_steps.rb |