spec/nanoc/base/services/outdatedness_rules_spec.rb in nanoc-4.4.6 vs spec/nanoc/base/services/outdatedness_rules_spec.rb in nanoc-4.4.7
- old
+ new
@@ -16,15 +16,23 @@
end
let(:item_rep) { Nanoc::Int::ItemRep.new(item, :default) }
let(:item) { Nanoc::Int::Item.new('stuff', {}, '/foo.md') }
- let(:site) { double(:site) }
let(:config) { Nanoc::Int::Configuration.new }
let(:code_snippets) { [] }
let(:objects) { [config] + code_snippets + [item] }
+ let(:site) do
+ Nanoc::Int::Site.new(
+ config: config,
+ items: [],
+ layouts: [],
+ code_snippets: code_snippets,
+ )
+ end
+
let(:action_provider) { double(:action_provider) }
let(:reps) { Nanoc::Int::ItemRepRepo.new }
let(:dependency_store) { Nanoc::Int::DependencyStore.new(dependency_store_objects) }
let(:rule_memory_store) { Nanoc::Int::RuleMemoryStore.new }
let(:checksum_store) { Nanoc::Int::ChecksumStore.new(objects: objects) }
@@ -65,18 +73,18 @@
end
context 'ConfigurationModified' do
let(:rule_class) { Nanoc::Int::OutdatednessRules::ConfigurationModified }
- context 'only non-outdated snippets' do
- let(:config) { Nanoc::Int::CodeSnippet.new('asdf', 'lib/foo.md') }
+ context 'non-outdated' do
+ let(:config) { Nanoc::Int::Configuration.new }
before { checksum_store.add(config) }
it { is_expected.not_to be }
end
- context 'only non-outdated snippets' do
+ context 'outdated' do
let(:config) { Nanoc::Int::Configuration.new }
let(:config_old) { Nanoc::Int::Configuration.new(hash: { foo: 125 }) }
before { checksum_store.add(config_old) }