spec/nanoc/base/services/outdatedness_rules_spec.rb in nanoc-4.7.6 vs spec/nanoc/base/services/outdatedness_rules_spec.rb in nanoc-4.7.7

- old
+ new

@@ -30,15 +30,16 @@ ) end let(:action_sequences) { {} } let(:reps) { Nanoc::Int::ItemRepRepo.new } - let(:dependency_store) { Nanoc::Int::DependencyStore.new(dependency_store_objects) } + let(:dependency_store) { Nanoc::Int::DependencyStore.new(items, layouts) } let(:action_sequence_store) { Nanoc::Int::ActionSequenceStore.new } let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: objects) } - let(:dependency_store_objects) { [item] } + let(:items) { Nanoc::Int::IdentifiableCollection.new(config, [item]) } + let(:layouts) { Nanoc::Int::IdentifiableCollection.new(config) } before do allow(site).to receive(:code_snippets).and_return(code_snippets) allow(site).to receive(:config).and_return(config) end @@ -327,63 +328,9 @@ mem.add_filter(:donkey, {}) end end it { is_expected.to be } - end - end - - context 'PathsModified' do - let(:rule_class) { Nanoc::Int::OutdatednessRules::PathsModified } - - let(:action_sequences) { { item_rep => new_mem } } - - context 'old mem does not exist' do - let(:new_mem) do - Nanoc::Int::ActionSequence.new(item_rep).tap do |mem| - mem.add_snapshot(:donkey, '/foo.md') - mem.add_filter(:asdf, {}) - end - end - - it { is_expected.to be } - end - - context 'old mem exists' do - let(:old_mem) do - Nanoc::Int::ActionSequence.new(item_rep).tap do |mem| - mem.add_filter(:erb, {}) - mem.add_snapshot(:donkey, '/foo.md') - end - end - - before do - action_sequence_store[item_rep] = old_mem.serialize - end - - context 'paths in memory are the same' do - let(:new_mem) do - Nanoc::Int::ActionSequence.new(item_rep).tap do |mem| - mem.add_snapshot(:donkey, '/foo.md') - mem.add_filter(:asdf, {}) - end - end - - it { is_expected.not_to be } - end - - context 'paths in memory are different' do - let(:new_mem) do - Nanoc::Int::ActionSequence.new(item_rep).tap do |mem| - mem.add_filter(:erb, {}) - mem.add_snapshot(:donkey, '/foo.md') - mem.add_filter(:donkey, {}) - mem.add_snapshot(:giraffe, '/bar.md') - end - end - - it { is_expected.to be } - end end end describe '#{Content,Attributes}Modified' do subject do