features/step_definitions/s3_steps.rb in paperclip-3.5.0 vs features/step_definitions/s3_steps.rb in paperclip-3.5.1

- old
+ new

@@ -1,6 +1,6 @@ When /^I attach the file "([^"]*)" to "([^"]*)" on S3$/ do |file_path, field| - definition = Paperclip::Tasks::Attachments.definitions_for(User)[field.downcase.to_sym] + definition = Paperclip::AttachmentRegistry.definitions_for(User)[field.downcase.to_sym] path = "https://paperclip.s3.amazonaws.com#{definition[:path]}" path.gsub!(':filename', File.basename(file_path)) path.gsub!(/:([^\/\.]+)/) do |match| "([^\/\.]+)" end