Sha256: 336fcf8a3ecec0e9f6321b1ee6d93bcef8328c672186c06ccb1265a407efdb6a

Contents?: true

Size: 1.47 KB

Versions: 9

Compression:

Stored size: 1.47 KB

Contents

# encoding:utf-8
require 'spec_helper'
describe TaxGenerator::Processor do

  let(:actor_pool) {mock}
  let(:workers) { TaxGenerator::FileCreator.new }

  before(:each) do

  end


  context "intialize" do

    specify { expect(subject.jobs).to eq({}) }
    specify { expect(subject.job_to_worker).to eq({}) }
    specify { expect(subject.worker_to_job).to eq({}) }
  end



  it 'returns the input folder' do
    subject.options.expects(:fetch).with(:input_dir, "#{root}/data/input")
    subject.input_folder
  end

  it 'returns the output_folder' do
    subject.options.expects(:fetch).with(:output_dir, "#{root}/data/output")
    subject.output_folder
  end

  it 'returns the taxonomy_filename' do
    subject.options.expects(:fetch).with(:taxonomy_filename, 'taxonomy.xml')
    subject.taxonomy_file_name
  end

  it 'returns the destinations_file_name' do
    subject.options.expects(:fetch).with(:destinations_filename, 'destinations.xml')
    subject.destinations_file_name
  end

  it 'returns the taxonomy_file_path' do
    File.expects(:join).with(subject.input_folder, subject.taxonomy_file_name).returns(true)
    subject.taxonomy_file_path
  end
  it 'returns the destinations_file_path' do
    File.expects(:join).with(subject.input_folder, subject.destinations_file_name).returns(true)
    subject.destinations_file_path
  end

  it 'returns the static_output_dir' do
    File.expects(:join).with(subject.output_folder, 'static').returns(true)
    subject.static_output_dir
  end


end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
tax_generator-0.8.0 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.7.1 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.7.0 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.6 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.5 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.4 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.3 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.2 spec/lib/tax_generator/classes/processor_spec.rb
tax_generator-0.6.1 spec/lib/tax_generator/classes/processor_spec.rb