Sha256: ed28830d7269e40c91205339af5458c138b5ef2181d9a5bb6813939a3854a994
Contents?: true
Size: 757 Bytes
Versions: 32
Compression:
Stored size: 757 Bytes
Contents
# encoding: utf-8 require File.dirname(__FILE__) + '/../spec_helper' describe CarrierWave::Uploader do before do @uploader_class = Class.new(CarrierWave::Uploader::Base) @uploader = @uploader_class.new end after do FileUtils.rm_rf(public_path) end describe '#model' do it "should be remembered from initialization" do model = mock('a model object') @uploader = @uploader_class.new(model) @uploader.model.should == model end end describe '#mounted_as' do it "should be remembered from initialization" do model = mock('a model object') @uploader = @uploader_class.new(model, :llama) @uploader.model.should == model @uploader.mounted_as.should == :llama end end end
Version data entries
32 entries across 32 versions & 8 rubygems