Sha256: 74262c2ca3def14897bbae437eed8ab8af55f88e7652c0a8edfafba8870604de

Contents?: true

Size: 588 Bytes

Versions: 5

Compression:

Stored size: 588 Bytes

Contents

require "spec_helper"

describe Massive::FileStep do
  let(:process)  { Massive::FileProcess.new file_attributes: { url: 'http://someurl.com' } }
  subject(:step) { Massive::FileStep.new process: process }

  it "delegates file to process" do
    step.file.should eq(process.file)
  end

  context "when it is started!" do
    let(:file) { process.file }
    let(:total_count) { 1234 }

    before { file.total_count = total_count }

    it "calculates the total count, using the processor total count" do
      step.start!
      step.total_count.should eq(total_count)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
massive-0.4.0 spec/models/massive/file_step_spec.rb
massive-0.3.0 spec/models/massive/file_step_spec.rb
massive-0.2.0 spec/models/massive/file_step_spec.rb
massive-0.1.1 spec/models/massive/file_step_spec.rb
massive-0.1.0 spec/models/massive/file_step_spec.rb