Sha256: 92c2893036a5f8eb46353533c88452ab6e5ce41566dca209a4b2dc3cad463079
Contents?: true
Size: 910 Bytes
Versions: 15
Compression:
Stored size: 910 Bytes
Contents
require 'spec_helper' require 'carrierwave/test/matchers' describe Adminpanel::ImageUploader do include CarrierWave::Test::Matchers before do Adminpanel::ImageUploader.enable_processing = true @image = Adminpanel::Image.new(:file => "test.jpg") @image_uploader = Adminpanel::ImageUploader.new(@image, :file) @image_uploader.store!(File.open(Rails.root + "app/assets/images/test.jpg")) end context 'the thumb version' do it "should scale down a landscape image to be exactly 220 by 220 pixels" do @image_uploader.thumb.should be_no_larger_than(220, 220) end end context 'the porfolio version' do it "should scale down a landscape image to be exactly 468 by 312 pixels" do @image_uploader.portfolio.should be_no_larger_than(468, 312) end end after do Adminpanel::ImageUploader.enable_processing = false @image_uploader.remove! end end
Version data entries
15 entries across 15 versions & 1 rubygems