Sha256: d857beb749719e4082c125844cb88afb055326e224a3d9ef7df27e3eda63e17f
Contents?: true
Size: 666 Bytes
Versions: 5
Compression:
Stored size: 666 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
5 entries across 5 versions & 1 rubygems