Sha256: fdb8f8a1e484b758c55f7b6ebc0e2ef162a9047b1fb5452fbae78bcd29bccce5

Contents?: true

Size: 934 Bytes

Versions: 20

Compression:

Stored size: 934 Bytes

Contents

require './test/helper'

class ProcessorTest < Test::Unit::TestCase
  should "instantiate 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
    should "run 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
    should "run 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

20 entries across 20 versions & 1 rubygems

Version Path
paperclip-4.1.1 test/processor_test.rb
paperclip-4.1.0 test/processor_test.rb
paperclip-3.5.4 test/processor_test.rb
paperclip-4.0.0 test/processor_test.rb
paperclip-3.5.3 test/processor_test.rb
paperclip-3.5.2 test/processor_test.rb
paperclip-3.5.1 test/processor_test.rb
paperclip-3.5.0 test/processor_test.rb
paperclip-3.4.2 test/processor_test.rb
paperclip-3.4.1 test/processor_test.rb
paperclip-3.4.0 test/processor_test.rb
paperclip-3.3.1 test/processor_test.rb
paperclip-3.2.1 test/processor_test.rb
paperclip-3.3.0 test/processor_test.rb
paperclip-3.2.0 test/processor_test.rb
paperclip-3.1.4 test/processor_test.rb
paperclip-3.1.2 test/processor_test.rb
paperclip-3.1.1 test/processor_test.rb
paperclip-3.1.0 test/processor_test.rb
paperclip-3.0.4 test/processor_test.rb