Sha256: b1154c2c60a396cb06ed12fa56b45cc40d2fa831292f775094d758a8c020675d
Contents?: true
Size: 892 Bytes
Versions: 5
Compression:
Stored size: 892 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 end
Version data entries
5 entries across 5 versions & 1 rubygems