Sha256: 05eb4ffee88fca54450119f29c7b01af1b0abced4d58a4cefb05445079a4272b

Contents?: true

Size: 664 Bytes

Versions: 4

Compression:

Stored size: 664 Bytes

Contents

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

When /^I attach the file at "([^"]*)"$/ do |file_path|
  attach_file('resource_file', File.join(File.expand_path('../../uploads/', __FILE__), file_path))
end

Then /^the file "([^"]*)" should have uploaded successfully$/ do |file_name|
  Resource.find_by_file_name(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_file', File.join(File.expand_path('../../uploads/', __FILE__), file_path))
  click_button 'Save'
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
refinerycms-0.9.8.9 vendor/refinerycms/resources/features/step_definitions/file_steps.rb
refinerycms-0.9.8.8 vendor/refinerycms/resources/features/step_definitions/file_steps.rb
refinerycms-0.9.8.7 vendor/refinerycms/resources/features/step_definitions/file_steps.rb
refinerycms-0.9.8.6 vendor/refinerycms/resources/features/step_definitions/file_steps.rb