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