Sha256: ca4b3c4eb07b9ede2c3d66f9056d9de90ebadbfaa6317a3ef84c9972091256fd
Contents?: true
Size: 860 Bytes
Versions: 4
Compression:
Stored size: 860 Bytes
Contents
require 'spec_helper' describe Hydra::Derivatives::Image do describe "when arguments are passed as a string" do let(:directives) {{ :thumb => "100x100>" } } subject { Hydra::Derivatives::Image.new(double(:obj), 'content', directives)} it "should use the string as the size and the name is autogenerated" do subject.should_receive(:create_resized_image).with("content_thumb", "100x100>", 'image/png') subject.process end end describe "when arguments are passed as a hash" do let(:directives) {{ :thumb => {size: "200x300>", datastream: 'thumbnail'} }} subject { Hydra::Derivatives::Image.new(double(:obj), 'content', directives)} it "should use the specified size and name" do subject.should_receive(:create_resized_image).with("thumbnail", "200x300>", 'image/png') subject.process end end end
Version data entries
4 entries across 4 versions & 1 rubygems