From 04a83107e14efcbfe85f1a7d46b9e4c2efe33c44 Mon Sep 17 00:00:00 2001 From: Dan Croak Date: Sat, 15 Aug 2009 07:19:09 -0400 Subject: [PATCH] fix for paperclip webrat step when model is two words --- features/step_definitions/paperclip_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/step_definitions/paperclip_steps.rb b/features/step_definitions/paperclip_steps.rb index 56d1cc5..df335d6 100644 --- a/features/step_definitions/paperclip_steps.rb +++ b/features/step_definitions/paperclip_steps.rb @@ -1,6 +1,6 @@ When /^I attach an? "([^\"]*)" file to an? "([^\"]*)" on S3$/ do |filename, klass| filename = filename.to_sym - definition = klass.classify.constantize.attachment_definitions[filename] + definition = klass.gsub(" ", "_").classify.constantize.attachment_definitions[filename] path = "http://s3.amazonaws.com/:id/#{definition[:path]}" path.gsub!(/:([^\/\.]+)/) do |match| -- libgit2 0.21.2