Skip to content

Instantly share code, notes, and snippets.

@joshuaclayton
Created April 15, 2009 14:44
Show Gist options
  • Save joshuaclayton/95805 to your computer and use it in GitHub Desktop.
Save joshuaclayton/95805 to your computer and use it in GitHub Desktop.
When /^I attach the file "([^\"]*)" to "([^\"]*)"$/ do |path, field|
path = File.join(RAILS_ROOT, path)
webrat.simulate do
attach_file(field, path)
end
webrat.automate do
# fake the upload
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment