Sha256: 9bc763686007aa110cd4121327f5914c2056e00af30fda57bde0842584c90881

Contents?: true

Size: 1.07 KB

Versions: 20

Compression:

Stored size: 1.07 KB

Contents

require 'spec_helper'

describe Daengine::DigitalAssetProcessor do
  before { Daengine.configure(:assets_path => Dir.pwd+'/spec/mock_data',
                              :daengine_yml_file => Dir.pwd+'/spec/mock_data/daengine.yml'
  ) }
  context "process_tuple_directory" do
    it 'processes only files modified in the last 2 days' do
      # process bulk deploy file in the mock dir
        DigitalAsset.destroy_all
        before = DigitalAsset.count
        FileUtils.touch Dir.pwd+'/spec/mock_data/bulk-ssc_deploy.xml'
        before = DigitalAsset.count   
        Daengine::DigitalAssetProcessor.process_tuple_directory 
        after = DigitalAsset.count
        (after - before).should > 1500
    end
    it 'processes only those files that modified since the last time the daengine process ran' do
      # process any files that has modified since last run. None !!
        before = DigitalAsset.count
        Daengine::DigitalAssetProcessor.process_tuple_directory
        after = DigitalAsset.count
        (after - before).should == 0
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
daengine-0.3.2 spec/lib/digital_asset_processor_spec.rb
daengine-0.3.1 spec/lib/digital_asset_processor_spec.rb
daengine-0.3 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.19 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.18 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.17 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.16 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.15 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.14 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.13 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.12 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.11 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.10 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.9 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.8 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.7 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.5 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.4 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.3 spec/lib/digital_asset_processor_spec.rb
daengine-0.2.2 spec/lib/digital_asset_processor_spec.rb