Sha256: a8aa7167317e348151093d113ff9e5f4591d8c7737cb248718342dc905a88c77

Contents?: true

Size: 667 Bytes

Versions: 15

Compression:

Stored size: 667 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

15 entries across 15 versions & 2 rubygems

Version Path
refinerycms-resources-0.9.9.15 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.14 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.13 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.12 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.11 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.10 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.9 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.8 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.7 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.5 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.4 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.3 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.2 features/step_definitions/file_steps.rb
refinerycms-resources-0.9.9.1 features/step_definitions/file_steps.rb
refinerycms-0.9.9 resources/features/step_definitions/file_steps.rb