spec/nanoc/base/services/outdatedness_checker_spec.rb in nanoc-4.7.6 vs spec/nanoc/base/services/outdatedness_checker_spec.rb in nanoc-4.7.7
- old
+ new
@@ -11,14 +11,15 @@
end
let(:checksum_store) { double(:checksum_store) }
let(:dependency_store) do
- Nanoc::Int::DependencyStore.new(objects)
+ Nanoc::Int::DependencyStore.new(items, layouts)
end
- let(:objects) { [item] }
+ let(:items) { Nanoc::Int::IdentifiableCollection.new(config, [item]) }
+ let(:layouts) { Nanoc::Int::IdentifiableCollection.new(config) }
let(:site) do
Nanoc::Int::Site.new(
config: config,
code_snippets: [],
@@ -47,21 +48,19 @@
end
let(:item_rep) { Nanoc::Int::ItemRep.new(item, :default) }
let(:item) { Nanoc::Int::Item.new('stuff', {}, '/foo.md') }
- let(:objects) { [item] }
-
before do
reps << item_rep
action_sequence_store[item_rep] = old_action_sequence_for_item_rep.serialize
end
describe 'basic outdatedness reasons' do
subject { outdatedness_checker.send(:basic).outdatedness_status_for(obj).reasons.first }
- let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: objects) }
+ let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: items.to_a + layouts.to_a) }
let(:config) { Nanoc::Int::Configuration.new }
before do
checksum_store.add(item)
@@ -112,17 +111,17 @@
end
describe '#outdated_due_to_dependencies?' do
subject { outdatedness_checker.send(:outdated_due_to_dependencies?, item) }
- let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: objects) }
+ let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: items.to_a + layouts.to_a) }
let(:other_item) { Nanoc::Int::Item.new('other stuff', {}, '/other.md') }
let(:other_item_rep) { Nanoc::Int::ItemRep.new(other_item, :default) }
let(:config) { Nanoc::Int::Configuration.new }
- let(:objects) { [item, other_item] }
+ let(:items) { Nanoc::Int::IdentifiableCollection.new(config, [item, other_item]) }
let(:old_action_sequence_for_other_item_rep) do
Nanoc::Int::ActionSequence.new(other_item_rep).tap do |seq|
seq.add_filter(:erb, {})
end