Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
Index: attachment_fu/test/fixtures/attachment.rb =================================================================== --- attachment_fu/test/fixtures/attachment.rb (revision 2878) +++ attachment_fu/test/fixtures/attachment.rb (working copy) @@ -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 =================================================================== --- attachment_fu/test/backends/remote/s3_test.rb (revision 2878) +++ attachment_fu/test/backends/remote/s3_test.rb (working copy) @@ -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
This paste will be private.
From the Design Piracy series on my blog: