Sha256: 5f531248b9f3c14441e080a0cacf042c99b39ee5049bb20f2a860963ed43658a
Contents?: true
Size: 984 Bytes
Versions: 5
Compression:
Stored size: 984 Bytes
Contents
require_relative 'spec_helper' require 'httpimagestore/configuration' Configuration::Scope.logger = Logger.new('/dev/null') require 'httpimagestore/configuration/thumbnailer' require 'httpimagestore/configuration/identify' MemoryLimit.logger = Logger.new('/dev/null') describe Configuration do describe 'thumbnailer' do before :all do log = support_dir + 'server.log' start_server( "httpthumbnailer -f -d -l #{log}", '/tmp/httpthumbnailer.pid', log, 'http://localhost:3100/' ) end let :state do Configuration::RequestState.new( (support_dir + 'compute.jpg').read ) end subject do Configuration.read(<<-'EOF') put { identify "input" } EOF end it 'should provide input image mime type' do subject.handlers[0].sources[0].realize(state) state.images['input'].mime_type.should be_nil subject.handlers[0].processors[0].realize(state) state.images['input'].mime_type.should == 'image/jpeg' end end end
Version data entries
5 entries across 5 versions & 1 rubygems