2012-01-23 17:21:11 +00:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Flowerbox::Delivery::UniqueAssetList do
|
|
|
|
let(:unique_asset_list) { described_class.new }
|
|
|
|
|
|
|
|
describe "#add" do
|
|
|
|
let(:first) { Pathname.new('one') }
|
|
|
|
let(:second) { Pathname.new('one') }
|
|
|
|
let(:third) { Pathname.new('two') }
|
|
|
|
|
|
|
|
it 'should not add assets already added' do
|
2012-01-30 16:34:57 +00:00
|
|
|
unique_asset_list.add(first)
|
|
|
|
unique_asset_list.add([ second, third ])
|
2012-01-23 17:21:11 +00:00
|
|
|
|
|
|
|
unique_asset_list.should == [ first, third ]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|