Sha256: 4736d5d10764ec7aba893593fd8755d8726d76deeef4750ad0d921e1b8267d88

Contents?: true

Size: 616 Bytes

Versions: 2

Compression:

Stored size: 616 Bytes

Contents

Given /^I have no files$/ do
  Resource.delete_all
end

When /^I attach the file at "([^"]*)"$/ do |file_path|
  attach_file('resource[uploaded_data]', File.join(Rails.root, file_path))
end

Then /^the file "([^"]*)" should have uploaded successfully$/ do |file_name|
  Resource.find_by_filename(file_name).nil?.should == false
end

And /^I should have ([0-9]+) files?$/ do |number|
  Resource.count.should == number.to_i
end

When /^I upload the file at "([^"]*)"$/ do |file_path|
  visit new_admin_resource_path
  attach_file('resource[uploaded_data]', File.join(Rails.root, file_path))
  click_button 'Save'
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
refinerycms-0.9.7.10 features/step_definitions/refinery/file_steps.rb
refinerycms-0.9.7.9 features/step_definitions/refinery/file_steps.rb