Sha256: d7b3b2646e344a62ef9098a6a6836891071189ae9db188089d6299c177e9606c
Contents?: true
Size: 953 Bytes
Versions: 2
Compression:
Stored size: 953 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe TBird::Processor do include TBirdSpecData before do @custom_process = ->(img) { img.quality 88 } @processor = TBird::Processor.new(upload_file[:tempfile]) end it "can process an image" do @processor.process(&@custom_process) @processor.image.valid?.must_equal true @processor.image.destroy! end it "can thumbnail an image" do @processor.thumbnail @processor.image.valid?.must_equal true @processor.image.destroy! end it "can resize an image" do @processor.resize('300') @processor.image.valid?.must_equal true @processor.image.destroy! end it "can return the original image" do @processor.original @processor.image.valid?.must_equal true @processor.image.destroy! end it "can write image" do @processor.resize('x200') @processor.write_to_file.must_be_instance_of File @processor.image.destroy! end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
t_bird-0.0.4 | spec/t_bird/processor_spec.rb |
t_bird-0.0.3 | spec/t_bird/processor_spec.rb |