Report abuse
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
Index: attachment_fu/test/fixtures/attachment.rb
===================================================================
@@ -122,6 +122,7 @@
has_attachment :storage => :s3, :path_prefix => 'some/custom/path/prefix', :processor => :rmagick
validates_as_attachment
end
-rescue Technoweenie::AttachmentFu::Backends::S3Backend::ConfigFileNotFoundError
+rescue Technoweenie::AttachmentFu::Backends::S3Backend::RequiredLibraryNotFoundError,
+ Technoweenie::AttachmentFu::Backends::S3Backend::ConfigFileNotFoundError
puts "S3 error: #{$!}"
end
Index: attachment_fu/test/backends/remote/s3_test.rb
===================================================================
@@ -2,7 +2,7 @@
require 'net/http'
class S3Test < Test::Unit::TestCase
- if File.exist?(File.join(File.dirname(__FILE__), '../../amazon_s3.yml'))
+ if defined? AWS::S3
include BaseAttachmentTests
attachment_model S3Attachment
@@ -97,7 +97,7 @@
end
else
def test_flunk_s3
- puts "s3 config file not loaded, tests not running"
+ puts "AWS::S3 not installed, skipping tests"
end
end
end
\ No newline at end of file
|