Sha256: 2a0d1b28051a290dd5d32d0b0aba140749614c5c1e22ac282c91c3a48301bdf5

Contents?: true

Size: 842 Bytes

Versions: 16

Compression:

Stored size: 842 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Dragonfly::JobDefinitions do

  describe "defining jobs" do

    before(:each) do
      @job_definitions = Dragonfly::JobDefinitions.new
      @object = Object.new
      @object.extend @job_definitions
    end

    describe "a simple job" do

      before(:each) do
        @job_definitions.add :thumb do |size|
          process :thumb, size
        end
      end

      it "correctly call job steps" do
        @object.should_receive(:process).with(:thumb, '30x30#').and_return(job=mock)
        @object.thumb('30x30#').should == job
      end

      it "should correctly call job steps when bang is given" do
        @object.should_receive(:process!).with(:thumb, '30x30#').and_return(@object)
        @object.thumb!('30x30#').should == @object
      end

    end

  end
  
end

Version data entries

16 entries across 16 versions & 2 rubygems

Version Path
dragonfly-0.8.6 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.8.5 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.8.4 spec/dragonfly/job_definitions_spec.rb
fog-dragonfly-0.8.2 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.8.2 spec/dragonfly/job_definitions_spec.rb
fog-dragonfly-0.8.1 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.8.1 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.8.0 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.7 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.6 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.5 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.4 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.3 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.2 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.1 spec/dragonfly/job_definitions_spec.rb
dragonfly-0.7.0 spec/dragonfly/job_definitions_spec.rb