Class: CarrierWave::Test::Matchers::ImageLoader
- Inherits:
-
Object
- Object
- CarrierWave::Test::Matchers::ImageLoader
- Defined in:
- lib/carrierwave/test/matchers.rb
Overview
:nodoc:
Class Method Summary collapse
Class Method Details
.load_image(filename) ⇒ Object
336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 |
# File 'lib/carrierwave/test/matchers.rb', line 336 def self.load_image(filename) if defined? ::MiniMagick MiniMagickWrapper.new(filename) else unless defined? ::Magick begin require 'rmagick' rescue LoadError require 'RMagick' rescue LoadError puts "WARNING: Failed to require rmagick, image processing may fail!" end end MagickWrapper.new(filename) end end |