Sha256: 4b8951adf51fd6e9863b92cf3570c28bdaf54a515ba76f5c7860a91b68c1ecad
Contents?: true
Size: 1002 Bytes
Versions: 9
Compression:
Stored size: 1002 Bytes
Contents
require 'spec_helper' describe Kuhsaft::ImageBrick do let :image_brick do Kuhsaft::ImageBrick.new end describe '#valid' do before do image_brick.valid? end context 'without an #image' do it 'has en error' do image_brick.should have(1).error_on(:image) end end end describe '#save' do context 'when changing the image size' do it 'regenerates the image version' do image_brick.stub(:image_size_changed?).and_return(true) image_brick.image.should_receive(:recreate_versions!) image_brick.resize_image_if_size_changed end end end describe '#bricks' do it 'can not have childs' do image_brick.should_not respond_to(:bricks) end end describe '#user_can_add_childs?' do it 'returns false' do image_brick.user_can_add_childs?.should be_false end end describe '#uploader?' do it 'returns true' do image_brick.uploader?.should be_true end end end
Version data entries
9 entries across 9 versions & 1 rubygems