Sha256: 493c0982a0899a63a915255ae6e581bdd71c3c7c00f1e695ba8bdea45ed58101

Contents?: true

Size: 691 Bytes

Versions: 6

Compression:

Stored size: 691 Bytes

Contents

require 'carrierwave/test/matchers'

describe ReceiptUploader do
  include CarrierWave::Test::Matchers

  before do
    ReceiptUploader.enable_processing = true
    @uploader = ReceiptUploader.new
    @uploader.store!(File.open(Rails.root.join('..', 'assets', 'images', 'receipt.jpg')))
  end

  after do
    ReceiptUploader.enable_processing = false
    @uploader.remove!
  end

  context 'the thumb version' do
    it "should scale down a landscape image to be exactly 64 by 64 pixels" do
      @uploader.thumb.should have_dimensions(64, 64)
    end
  end

  it "should make the image readable only to the owner and not executable" do
    @uploader.should have_permissions(0600)
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bookkeeper-0.0.4 spec/uploaders/receipt_uploader_spec.rb
bookkeeper-0.0.3 spec/uploaders/receipt_uploader_spec.rb
bookkeeper-0.0.2 spec/uploaders/receipt_uploader_spec.rb
bookkeeper-0.0.1 spec/uploaders/receipt_uploader_spec.rb
bookkeeper-0.0.1.beta2 spec/uploaders/receipt_uploader_spec.rb
bookkeeper-0.0.1.beta1 spec/uploaders/receipt_uploader_spec.rb