Sha256: 200c28d1e839366a9dced861230cf81600378714415d254313a2307aa32c744b

Contents?: true

Size: 913 Bytes

Versions: 28

Compression:

Stored size: 913 Bytes

Contents

require 'spec_helper'

describe Paperclip::Processor do
  it "instantiates and call #make when sent #make to the class" do
    processor = mock
    processor.expects(:make).with()
    Paperclip::Processor.expects(:new).with(:one, :two, :three).returns(processor)
    Paperclip::Processor.make(:one, :two, :three)
  end

  context "Calling #convert" do
    it "runs the convert command with Cocaine" do
      Paperclip.options[:log_command] = false
      Cocaine::CommandLine.expects(:new).with("convert", "stuff", {}).returns(stub(:run))
      Paperclip::Processor.new('filename').convert("stuff")
    end
  end

  context "Calling #identify" do
    it "runs the identify command with Cocaine" do
      Paperclip.options[:log_command] = false
      Cocaine::CommandLine.expects(:new).with("identify", "stuff", {}).returns(stub(:run))
      Paperclip::Processor.new('filename').identify("stuff")
    end
  end
end

Version data entries

28 entries across 26 versions & 6 rubygems

Version Path
kt-paperclip-4.4.0 spec/paperclip/processor_spec.rb
paperclip-5.2.1 spec/paperclip/processor_spec.rb
paperclip-5.2.0 spec/paperclip/processor_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/paperclip-5.1.0/spec/paperclip/processor_spec.rb
paperclip-5.1.0 spec/paperclip/processor_spec.rb
paperclip-5.0.0 spec/paperclip/processor_spec.rb
paperclip-4.3.7 spec/paperclip/processor_spec.rb
paperclip_jk-5.0.0.beta2 spec/paperclip/processor_spec.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/paperclip-4.3.6/spec/paperclip/processor_spec.rb
paperclip-5.0.0.beta2 spec/paperclip/processor_spec.rb
paperclip-5.0.0.beta1 spec/paperclip/processor_spec.rb
paperclip-4.3.6 spec/paperclip/processor_spec.rb
paperclip-4.3.5 spec/paperclip/processor_spec.rb
paperclip-4.3.4 spec/paperclip/processor_spec.rb
paperclip-4.3.3 spec/paperclip/processor_spec.rb
paperclip-4.3.2 spec/paperclip/processor_spec.rb
paperclip-4.3.1 spec/paperclip/processor_spec.rb
solidus_backend-1.0.0.pre3 vendor/bundle/gems/paperclip-4.2.4/spec/paperclip/processor_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/paperclip-4.2.4/spec/paperclip/processor_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/paperclip-4.2.2/spec/paperclip/processor_spec.rb