Sha256: 7f2a06400de3de4d8d665dca0f46c32037cbc07dbbfc9426d2f17f36d32fa56d
Contents?: true
Size: 1.67 KB
Versions: 1
Compression:
Stored size: 1.67 KB
Contents
# Put your step definitions here When(/^I run "(.*?)" for the test data$/) do |arg1| @output = `filentory-cli "testrun" test/integration/data -t DVD --log-level fatal` end Then(/^I should get JSON as output$/) do @output.should have_json_path("name") @output.should have_json_path("files") @output.should have_json_path("type") end Then(/^the "(.*?)" should be "(.*?)"$/) do |key, value| steps "And the JSON response at \"#{key}\" should be \"#{value}\"" end Then(/^there should be (\d+) entries in "(.*?)"$/) do |number, path| steps "And the JSON at \"#{path}/0\" should have #{number} entries" end Then(/^the first file should be placed in the root folder$/) do steps %q{ And the JSON at "files/0/0/name" should be "fileA.txt" And the JSON at "files/0/0/path" should be "." } end Then(/^the second file should be in the "(.*?)"$/) do |folder_name| steps %Q{ And the JSON at "files/0/1/name" should be "fileB.txt" And the JSON at "files/0/1/path" should be "#{folder_name}" } end Then(/^the image file should have metadata$/) do steps %Q{ And the JSON at "files/0/2/metadata" should be a hash And the JSON at "files/0/2/metadata" should have 6 entries And the JSON at "files/0/2/metadata/exif.artist" should be "Johnny Graber" And the JSON at "files/0/2/metadata/exif.date_time" should be "2013-11-02T18:10:43+00:00" } end Then(/^the video file should have metadata$/) do steps %q{ And the JSON at "files/0/3/metadata" should be a hash And the JSON at "files/0/3/metadata/audio_codec" should be "aac" And the JSON at "files/0/3/metadata/creation_time" should be "2014-01-09T14:21:30+00:00" } end def last_json @output end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
filentory-cli-0.2.0 | features/step_definitions/filentory-cli_steps.rb |