Sha256: 36f079980f602286a57866cf3ed1b76843c8aae3fce3b3939cebecb3057b3809
Contents?: true
Size: 1.07 KB
Versions: 15
Compression:
Stored size: 1.07 KB
Contents
require 'spec_helper' require 'support/test_database' require 'carrierwave/test/matchers' describe Adminpanel::GalleryUploader do include CarrierWave::Test::Matchers before do Adminpanel::GalleryUploader.enable_processing = true @gallery = Adminpanel::Gallery.new(:file => "test.jpg") @gallery_uploader = Adminpanel::GalleryUploader.new(@gallery, :file) @gallery_uploader.store!(File.open(Rails.root + "app/assets/images/hipster.jpg")) end context 'the gallery.thumb version' do it "should scale down a landscape image to be exactly 200 by 200 pixels" do @gallery_uploader.thumb.should be_no_larger_than(200, 200) end after do Adminpanel::GalleryUploader.enable_processing = false @gallery_uploader.remove! end end context 'the gallery.default version' do it "should scale down a landscape image to fit within 1024 by 450 pixels" do @gallery_uploader.should have_dimensions(1024, 450) end after do Adminpanel::GalleryUploader.enable_processing = false @gallery_uploader.remove! end end end
Version data entries
15 entries across 15 versions & 1 rubygems