spec/nanoc/base/services/outdatedness_checker_spec.rb in nanoc-4.4.6 vs spec/nanoc/base/services/outdatedness_checker_spec.rb in nanoc-4.4.7
- old
+ new
@@ -8,14 +8,27 @@
action_provider: action_provider,
reps: reps,
)
end
- let(:site) { double(:site) }
let(:checksum_store) { double(:checksum_store) }
- let(:dependency_store) { double(:dependency_store) }
+ let(:dependency_store) do
+ Nanoc::Int::DependencyStore.new(objects)
+ end
+
+ let(:objects) { [item] }
+
+ let(:site) do
+ Nanoc::Int::Site.new(
+ config: config,
+ items: [],
+ layouts: [],
+ code_snippets: [],
+ )
+ end
+
let(:rule_memory_store) do
Nanoc::Int::RuleMemoryStore.new
end
let(:old_memory_for_item_rep) do
@@ -99,13 +112,9 @@
end
end
describe '#outdated_due_to_dependencies?' do
subject { outdatedness_checker.send(:outdated_due_to_dependencies?, item) }
-
- let(:dependency_store) do
- Nanoc::Int::DependencyStore.new(objects)
- end
let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: objects) }
let(:other_item) { Nanoc::Int::Item.new('other stuff', {}, '/other.md') }
let(:other_item_rep) { Nanoc::Int::ItemRep.new(other_item, :default) }