diff --git a/spec/orm/activerecord_spec.rb b/spec/orm/activerecord_spec.rb index 94c074d11..6deca0395 100644 --- a/spec/orm/activerecord_spec.rb +++ b/spec/orm/activerecord_spec.rb @@ -164,6 +164,30 @@ def reset_class(class_name) expect(@event.reload.image).to be_blank end + + context "with CarrierWave::MiniMagick" do + before(:each) do + @uploader.send(:include, CarrierWave::MiniMagick) + end + + it "has width and height" do + @event.image = stub_file('landscape.jpg') + expect(@event.image.width).to eq 640 + expect(@event.image.height).to eq 480 + end + end + + context "with CarrierWave::MiniMagick" do + before(:each) do + @uploader.send(:include, CarrierWave::RMagick) + end + + it "has width and height" do + @event.image = stub_file('landscape.jpg') + expect(@event.image.width).to eq 640 + expect(@event.image.height).to eq 480 + end + end end describe '#image=' do