Skip to content

Instantly share code, notes, and snippets.

@lemanchester
Last active August 29, 2015 14:21
Show Gist options
  • Save lemanchester/fcd06c62acf4d4a5ff26 to your computer and use it in GitHub Desktop.
Save lemanchester/fcd06c62acf4d4a5ff26 to your computer and use it in GitHub Desktop.
require 'rails_helper'
describe ProductUploader do
include CarrierWave::Test::Matchers
let(:company) { seed :master_company }
let(:uploader) { ProductUploader.new(company, :image) }
it 'creates image versions' do
uploader.store!(File.open("#{Rails.root}/spec/support/images/death_star.jpg"))
expect(uploader.thumb).to have_dimensions(105, 105)
expect(uploader.main).to have_dimensions(250, 250)
uploader.remove!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment