nanoc 4.4.5 → 4.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +6 -2
- data/Gemfile.lock +37 -18
- data/NEWS.md +6 -0
- data/Rakefile +8 -20
- data/lib/nanoc/base/entities/code_snippet.rb +0 -2
- data/lib/nanoc/base/entities/item_rep.rb +4 -22
- data/lib/nanoc/base/entities/processing_actions/snapshot.rb +9 -7
- data/lib/nanoc/base/entities/rule_memory.rb +15 -7
- data/lib/nanoc/base/entities/snapshot_def.rb +2 -8
- data/lib/nanoc/base/repos/store.rb +2 -28
- data/lib/nanoc/base/services/checksummer.rb +9 -10
- data/lib/nanoc/base/services/compiler.rb +14 -16
- data/lib/nanoc/base/services/executor.rb +2 -13
- data/lib/nanoc/base/views/mixins/with_reps_view_mixin.rb +1 -1
- data/lib/nanoc/checking/checks/external_links.rb +2 -1
- data/lib/nanoc/cli/commands/compile.rb +8 -14
- data/lib/nanoc/extra/parallel_collection.rb +57 -0
- data/lib/nanoc/extra.rb +1 -0
- data/lib/nanoc/filters/mustache.rb +1 -1
- data/lib/nanoc/rule_dsl/recording_executor.rb +6 -34
- data/lib/nanoc/rule_dsl/rule_memory_calculator.rb +42 -12
- data/lib/nanoc/spec.rb +1 -1
- data/lib/nanoc/version.rb +1 -1
- data/nanoc.gemspec +1 -2
- data/spec/contributors_spec.rb +18 -0
- data/spec/nanoc/base/checksummer_spec.rb +381 -0
- data/spec/nanoc/base/compiler_spec.rb +181 -0
- data/spec/nanoc/base/entities/configuration_spec.rb +49 -0
- data/spec/nanoc/base/entities/content_spec.rb +193 -0
- data/spec/nanoc/base/entities/document_spec.rb +206 -0
- data/spec/nanoc/base/entities/identifier_spec.rb +460 -0
- data/spec/nanoc/base/entities/item_rep_spec.rb +226 -0
- data/spec/nanoc/base/entities/item_spec.rb +3 -0
- data/spec/nanoc/base/entities/layout_spec.rb +3 -0
- data/spec/nanoc/base/entities/lazy_value_spec.rb +106 -0
- data/spec/nanoc/base/entities/outdatedness_status_spec.rb +113 -0
- data/spec/nanoc/base/entities/pattern_spec.rb +125 -0
- data/spec/nanoc/base/entities/processing_action_spec.rb +9 -0
- data/spec/nanoc/base/entities/processing_actions/filter_spec.rb +18 -0
- data/spec/nanoc/base/entities/processing_actions/layout_spec.rb +18 -0
- data/spec/nanoc/base/entities/processing_actions/snapshot_spec.rb +32 -0
- data/spec/nanoc/base/entities/props_spec.rb +195 -0
- data/spec/nanoc/base/entities/rule_memory_spec.rb +131 -0
- data/spec/nanoc/base/entities/site_spec.rb +73 -0
- data/spec/nanoc/base/feature_spec.rb +107 -0
- data/spec/nanoc/base/filter_spec.rb +99 -0
- data/spec/nanoc/base/item_rep_writer_spec.rb +131 -0
- data/spec/nanoc/base/plugin_registry_spec.rb +29 -0
- data/spec/nanoc/base/repos/checksum_store_spec.rb +133 -0
- data/spec/nanoc/base/repos/compiled_content_cache_spec.rb +55 -0
- data/spec/nanoc/base/repos/config_loader_spec.rb +243 -0
- data/spec/nanoc/base/repos/dependency_store_spec.rb +195 -0
- data/spec/nanoc/base/repos/site_loader_spec.rb +214 -0
- data/spec/nanoc/base/services/dependency_tracker_spec.rb +238 -0
- data/spec/nanoc/base/services/executor_spec.rb +495 -0
- data/spec/nanoc/base/services/item_rep_router_spec.rb +134 -0
- data/spec/nanoc/base/services/item_rep_selector_spec.rb +169 -0
- data/spec/nanoc/base/services/outdatedness_checker_spec.rb +370 -0
- data/spec/nanoc/base/services/outdatedness_rules_spec.rb +432 -0
- data/spec/nanoc/base/services/pruner_spec.rb +105 -0
- data/spec/nanoc/base/services/temp_filename_factory_spec.rb +87 -0
- data/spec/nanoc/base/views/config_view_spec.rb +96 -0
- data/spec/nanoc/base/views/document_view_spec.rb +332 -0
- data/spec/nanoc/base/views/identifiable_collection_view_spec.rb +190 -0
- data/spec/nanoc/base/views/item_collection_with_reps_view_spec.rb +18 -0
- data/spec/nanoc/base/views/item_collection_without_reps_view_spec.rb +18 -0
- data/spec/nanoc/base/views/item_rep_collection_view_spec.rb +143 -0
- data/spec/nanoc/base/views/item_rep_view_spec.rb +265 -0
- data/spec/nanoc/base/views/item_view_spec.rb +341 -0
- data/spec/nanoc/base/views/layout_collection_view_spec.rb +18 -0
- data/spec/nanoc/base/views/layout_view_spec.rb +14 -0
- data/spec/nanoc/base/views/mutable_config_view_spec.rb +16 -0
- data/spec/nanoc/base/views/mutable_document_view_spec.rb +92 -0
- data/spec/nanoc/base/views/mutable_identifiable_collection_view_spec.rb +36 -0
- data/spec/nanoc/base/views/mutable_item_collection_view_spec.rb +49 -0
- data/spec/nanoc/base/views/mutable_item_view_spec.rb +22 -0
- data/spec/nanoc/base/views/mutable_layout_collection_view_spec.rb +49 -0
- data/spec/nanoc/base/views/mutable_layout_view_spec.rb +13 -0
- data/spec/nanoc/base/views/post_compile_item_rep_collection_view_spec.rb +4 -0
- data/spec/nanoc/base/views/post_compile_item_rep_view_spec.rb +137 -0
- data/spec/nanoc/base/views/post_compile_item_view_spec.rb +56 -0
- data/spec/nanoc/cli/commands/compile/file_action_printer_spec.rb +76 -0
- data/spec/nanoc/cli/commands/compile/timing_recorder_spec.rb +66 -0
- data/spec/nanoc/cli/commands/compile_spec.rb +64 -0
- data/spec/nanoc/cli/commands/deploy_spec.rb +327 -0
- data/spec/nanoc/cli/commands/shell_spec.rb +54 -0
- data/spec/nanoc/cli/commands/show_data_spec.rb +126 -0
- data/spec/nanoc/cli/commands/show_rules_spec.rb +112 -0
- data/spec/nanoc/cli/commands/view_spec.rb +58 -0
- data/spec/nanoc/data_sources/filesystem_spec.rb +56 -0
- data/spec/nanoc/deploying/fog_spec.rb +193 -0
- data/spec/nanoc/extra/parallel_collection_spec.rb +108 -0
- data/spec/nanoc/filters/colorize_syntax/rouge_spec.rb +195 -0
- data/spec/nanoc/filters/less_spec.rb +120 -0
- data/spec/nanoc/helpers/blogging_spec.rb +216 -0
- data/spec/nanoc/helpers/breadcrumbs_spec.rb +133 -0
- data/spec/nanoc/helpers/capturing_spec.rb +181 -0
- data/spec/nanoc/helpers/child_parent_spec.rb +105 -0
- data/spec/nanoc/helpers/filtering_spec.rb +72 -0
- data/spec/nanoc/helpers/html_escape_spec.rb +35 -0
- data/spec/nanoc/helpers/link_to_spec.rb +275 -0
- data/spec/nanoc/helpers/rendering_spec.rb +141 -0
- data/spec/nanoc/helpers/tagging_spec.rb +104 -0
- data/spec/nanoc/helpers/text_spec.rb +58 -0
- data/spec/nanoc/integration/outdatedness_integration_spec.rb +208 -0
- data/spec/nanoc/regressions/gh_1015_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_1031_spec.rb +54 -0
- data/spec/nanoc/regressions/gh_1035_spec.rb +33 -0
- data/spec/nanoc/regressions/gh_1040_spec.rb +22 -0
- data/spec/nanoc/regressions/gh_761_spec.rb +23 -0
- data/spec/nanoc/regressions/gh_767_spec.rb +19 -0
- data/spec/nanoc/regressions/gh_769_spec.rb +30 -0
- data/spec/nanoc/regressions/gh_776_spec.rb +43 -0
- data/spec/nanoc/regressions/gh_787_spec.rb +19 -0
- data/spec/nanoc/regressions/gh_795_spec.rb +19 -0
- data/spec/nanoc/regressions/gh_804_spec.rb +26 -0
- data/spec/nanoc/regressions/gh_807_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_809_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_813_spec.rb +22 -0
- data/spec/nanoc/regressions/gh_815_spec.rb +18 -0
- data/spec/nanoc/regressions/gh_828_spec.rb +23 -0
- data/spec/nanoc/regressions/gh_833_spec.rb +14 -0
- data/spec/nanoc/regressions/gh_841_spec.rb +15 -0
- data/spec/nanoc/regressions/gh_867_spec.rb +15 -0
- data/spec/nanoc/regressions/gh_882_spec.rb +29 -0
- data/spec/nanoc/regressions/gh_885_spec.rb +30 -0
- data/spec/nanoc/regressions/gh_891_spec.rb +26 -0
- data/spec/nanoc/regressions/gh_913_spec.rb +24 -0
- data/spec/nanoc/regressions/gh_928_spec.rb +5 -0
- data/spec/nanoc/regressions/gh_937_spec.rb +25 -0
- data/spec/nanoc/regressions/gh_942_spec.rb +21 -0
- data/spec/nanoc/regressions/gh_947_spec.rb +21 -0
- data/spec/nanoc/regressions/gh_948_spec.rb +16 -0
- data/spec/nanoc/regressions/gh_951_spec.rb +19 -0
- data/spec/nanoc/regressions/gh_954_spec.rb +33 -0
- data/spec/nanoc/regressions/gh_970a_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_970b_spec.rb +50 -0
- data/spec/nanoc/regressions/gh_974_spec.rb +17 -0
- data/spec/nanoc/regressions/gh_981_spec.rb +21 -0
- data/spec/nanoc/rule_dsl/recording_executor_spec.rb +142 -0
- data/spec/nanoc/rule_dsl/rule_context_spec.rb +177 -0
- data/spec/nanoc/rule_dsl/rule_memory_calculator_spec.rb +233 -0
- data/spec/nanoc/rule_dsl/rules_collection_spec.rb +299 -0
- data/spec/regression_filenames_spec.rb +16 -0
- data/spec/spec_helper.rb +173 -0
- data/test/base/core_ext/array_spec.rb +2 -0
- data/test/base/core_ext/hash_spec.rb +2 -0
- data/test/base/core_ext/string_spec.rb +2 -0
- data/test/base/test_code_snippet.rb +2 -0
- data/test/base/test_compiler.rb +2 -0
- data/test/base/test_context.rb +4 -2
- data/test/base/test_data_source.rb +2 -0
- data/test/base/test_dependency_tracker.rb +2 -0
- data/test/base/test_directed_graph.rb +2 -0
- data/test/base/test_filter.rb +7 -5
- data/test/base/test_item.rb +2 -0
- data/test/base/test_item_array.rb +3 -1
- data/test/base/test_layout.rb +2 -0
- data/test/base/test_memoization.rb +2 -0
- data/test/base/test_notification_center.rb +2 -0
- data/test/base/test_outdatedness_checker.rb +2 -0
- data/test/base/test_plugin.rb +2 -0
- data/test/base/test_site.rb +2 -0
- data/test/base/test_store.rb +2 -0
- data/test/checking/checks/test_css.rb +2 -0
- data/test/checking/checks/test_external_links.rb +4 -2
- data/test/checking/checks/test_html.rb +2 -0
- data/test/checking/checks/test_internal_links.rb +5 -3
- data/test/checking/checks/test_mixed_content.rb +2 -0
- data/test/checking/checks/test_stale.rb +2 -0
- data/test/checking/test_check.rb +2 -0
- data/test/checking/test_dsl.rb +2 -0
- data/test/checking/test_runner.rb +2 -0
- data/test/cli/commands/test_check.rb +2 -0
- data/test/cli/commands/test_compile.rb +2 -0
- data/test/cli/commands/test_create_site.rb +2 -0
- data/test/cli/commands/test_help.rb +2 -0
- data/test/cli/commands/test_info.rb +2 -0
- data/test/cli/commands/test_prune.rb +2 -0
- data/test/cli/test_cleaning_stream.rb +2 -0
- data/test/cli/test_cli.rb +11 -9
- data/test/cli/test_error_handler.rb +2 -0
- data/test/cli/test_logger.rb +2 -0
- data/test/data_sources/test_filesystem.rb +8 -6
- data/test/data_sources/test_filesystem_tools.rb +2 -0
- data/test/deploying/test_fog.rb +2 -0
- data/test/deploying/test_rsync.rb +4 -2
- data/test/extra/core_ext/test_pathname.rb +2 -0
- data/test/extra/core_ext/test_time.rb +2 -0
- data/test/extra/test_link_collector.rb +2 -0
- data/test/extra/test_piper.rb +2 -0
- data/test/filters/colorize_syntax/test_coderay.rb +2 -0
- data/test/filters/colorize_syntax/test_common.rb +2 -0
- data/test/filters/colorize_syntax/test_pygmentize.rb +2 -0
- data/test/filters/colorize_syntax/test_pygments.rb +2 -0
- data/test/filters/colorize_syntax/test_simon.rb +2 -0
- data/test/filters/test_asciidoc.rb +2 -0
- data/test/filters/test_bluecloth.rb +2 -0
- data/test/filters/test_coffeescript.rb +2 -0
- data/test/filters/test_erb.rb +7 -5
- data/test/filters/test_erubis.rb +6 -4
- data/test/filters/test_haml.rb +7 -5
- data/test/filters/test_handlebars.rb +2 -0
- data/test/filters/test_kramdown.rb +2 -0
- data/test/filters/test_markaby.rb +2 -0
- data/test/filters/test_maruku.rb +2 -0
- data/test/filters/test_mustache.rb +4 -2
- data/test/filters/test_pandoc.rb +2 -0
- data/test/filters/test_rainpress.rb +2 -0
- data/test/filters/test_rdiscount.rb +2 -0
- data/test/filters/test_rdoc.rb +2 -0
- data/test/filters/test_redcarpet.rb +2 -0
- data/test/filters/test_redcloth.rb +2 -0
- data/test/filters/test_relativize_paths.rb +2 -0
- data/test/filters/test_rubypants.rb +2 -0
- data/test/filters/test_sass.rb +4 -2
- data/test/filters/test_slim.rb +4 -2
- data/test/filters/test_typogruby.rb +2 -0
- data/test/filters/test_uglify_js.rb +2 -0
- data/test/filters/test_xsl.rb +2 -0
- data/test/filters/test_yui_compressor.rb +5 -3
- data/test/helpers/test_blogging.rb +2 -0
- data/test/helpers/test_capturing.rb +2 -0
- data/test/helpers/test_link_to.rb +2 -0
- data/test/helpers/test_xml_sitemap.rb +2 -0
- data/test/rule_dsl/test_action_provider.rb +2 -0
- data/test/rule_dsl/test_compiler_dsl.rb +6 -4
- data/test/rule_dsl/test_rule.rb +2 -0
- data/test/rule_dsl/test_rules_collection.rb +2 -0
- data/test/test_gem.rb +2 -0
- metadata +124 -17
- data/test/base/test_item_rep.rb +0 -156
@@ -0,0 +1,238 @@
|
|
1
|
+
describe Nanoc::Int::DependencyTracker do
|
2
|
+
let(:tracker) { described_class.new(store) }
|
3
|
+
|
4
|
+
let(:store) { Nanoc::Int::DependencyStore.new([]) }
|
5
|
+
|
6
|
+
let(:item_a) { Nanoc::Int::Item.new('a', {}, '/a.md') }
|
7
|
+
let(:item_b) { Nanoc::Int::Item.new('b', {}, '/b.md') }
|
8
|
+
let(:item_c) { Nanoc::Int::Item.new('c', {}, '/c.md') }
|
9
|
+
|
10
|
+
shared_examples 'a null dependency tracker' do
|
11
|
+
let(:tracker) { Nanoc::Int::DependencyTracker::Null.new }
|
12
|
+
|
13
|
+
example do
|
14
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_a) }
|
15
|
+
end
|
16
|
+
|
17
|
+
example do
|
18
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
19
|
+
end
|
20
|
+
|
21
|
+
example do
|
22
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
23
|
+
end
|
24
|
+
|
25
|
+
example do
|
26
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_a) }
|
27
|
+
end
|
28
|
+
|
29
|
+
example do
|
30
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_b) }
|
31
|
+
end
|
32
|
+
|
33
|
+
example do
|
34
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_c) }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
describe '#enter and #exit' do
|
39
|
+
context 'enter' do
|
40
|
+
subject do
|
41
|
+
tracker.enter(item_a)
|
42
|
+
end
|
43
|
+
|
44
|
+
it_behaves_like 'a null dependency tracker'
|
45
|
+
|
46
|
+
example do
|
47
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_a) }
|
48
|
+
end
|
49
|
+
|
50
|
+
example do
|
51
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
52
|
+
end
|
53
|
+
|
54
|
+
example do
|
55
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
context 'enter + enter' do
|
60
|
+
subject do
|
61
|
+
tracker.enter(item_a)
|
62
|
+
tracker.enter(item_b)
|
63
|
+
end
|
64
|
+
|
65
|
+
it_behaves_like 'a null dependency tracker'
|
66
|
+
|
67
|
+
it 'changes predecessors of item A' do
|
68
|
+
expect { subject }.to change { store.objects_causing_outdatedness_of(item_a) }
|
69
|
+
.from([]).to([item_b])
|
70
|
+
end
|
71
|
+
|
72
|
+
example do
|
73
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
74
|
+
end
|
75
|
+
|
76
|
+
example do
|
77
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
context 'enter + enter with props' do
|
82
|
+
subject do
|
83
|
+
tracker.enter(item_a)
|
84
|
+
tracker.enter(item_b, compiled_content: true)
|
85
|
+
end
|
86
|
+
|
87
|
+
it_behaves_like 'a null dependency tracker'
|
88
|
+
|
89
|
+
it 'changes predecessors of item A' do
|
90
|
+
expect { subject }.to change { store.objects_causing_outdatedness_of(item_a) }
|
91
|
+
.from([]).to([item_b])
|
92
|
+
end
|
93
|
+
|
94
|
+
it 'changes dependencies causing outdatedness of item A' do
|
95
|
+
expect { subject }.to change { store.dependencies_causing_outdatedness_of(item_a).size }
|
96
|
+
.from(0).to(1)
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'creates correct new dependency causing outdatedness of item A' do
|
100
|
+
subject
|
101
|
+
dep = store.dependencies_causing_outdatedness_of(item_a)[0]
|
102
|
+
|
103
|
+
expect(dep.from).to eql(item_b)
|
104
|
+
expect(dep.to).to eql(item_a)
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'creates dependency with correct props causing outdatedness of item A' do
|
108
|
+
subject
|
109
|
+
dep = store.dependencies_causing_outdatedness_of(item_a)[0]
|
110
|
+
|
111
|
+
expect(dep.props.compiled_content?).to eq(true)
|
112
|
+
|
113
|
+
expect(dep.props.raw_content?).to eq(false)
|
114
|
+
expect(dep.props.attributes?).to eq(false)
|
115
|
+
expect(dep.props.path?).to eq(false)
|
116
|
+
end
|
117
|
+
|
118
|
+
example do
|
119
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
120
|
+
end
|
121
|
+
|
122
|
+
example do
|
123
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
124
|
+
end
|
125
|
+
|
126
|
+
example do
|
127
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_b) }
|
128
|
+
end
|
129
|
+
|
130
|
+
example do
|
131
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_c) }
|
132
|
+
end
|
133
|
+
end
|
134
|
+
|
135
|
+
context 'enter + enter with prop + exit + enter with prop' do
|
136
|
+
subject do
|
137
|
+
tracker.enter(item_a)
|
138
|
+
tracker.enter(item_b, compiled_content: true)
|
139
|
+
tracker.exit
|
140
|
+
tracker.enter(item_b, attributes: true)
|
141
|
+
end
|
142
|
+
|
143
|
+
it_behaves_like 'a null dependency tracker'
|
144
|
+
|
145
|
+
it 'changes predecessors of item A' do
|
146
|
+
expect { subject }.to change { store.objects_causing_outdatedness_of(item_a) }
|
147
|
+
.from([]).to([item_b])
|
148
|
+
end
|
149
|
+
|
150
|
+
it 'changes dependencies causing outdatedness of item A' do
|
151
|
+
expect { subject }.to change { store.dependencies_causing_outdatedness_of(item_a).size }
|
152
|
+
.from(0).to(1)
|
153
|
+
end
|
154
|
+
|
155
|
+
it 'creates correct new dependency causing outdatedness of item A' do
|
156
|
+
subject
|
157
|
+
dep = store.dependencies_causing_outdatedness_of(item_a)[0]
|
158
|
+
|
159
|
+
expect(dep.from).to eql(item_b)
|
160
|
+
expect(dep.to).to eql(item_a)
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'creates dependency with correct props causing outdatedness of item A' do
|
164
|
+
subject
|
165
|
+
dep = store.dependencies_causing_outdatedness_of(item_a)[0]
|
166
|
+
|
167
|
+
expect(dep.props.compiled_content?).to eq(true)
|
168
|
+
expect(dep.props.attributes?).to eq(true)
|
169
|
+
|
170
|
+
expect(dep.props.raw_content?).to eq(false)
|
171
|
+
expect(dep.props.path?).to eq(false)
|
172
|
+
end
|
173
|
+
|
174
|
+
example do
|
175
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
176
|
+
end
|
177
|
+
|
178
|
+
example do
|
179
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
180
|
+
end
|
181
|
+
|
182
|
+
example do
|
183
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_b) }
|
184
|
+
end
|
185
|
+
|
186
|
+
example do
|
187
|
+
expect { subject }.not_to change { store.dependencies_causing_outdatedness_of(item_c) }
|
188
|
+
end
|
189
|
+
end
|
190
|
+
|
191
|
+
context 'enter + enter + exit + enter' do
|
192
|
+
subject do
|
193
|
+
tracker.enter(item_a)
|
194
|
+
tracker.enter(item_b)
|
195
|
+
tracker.exit
|
196
|
+
tracker.enter(item_c)
|
197
|
+
end
|
198
|
+
|
199
|
+
it_behaves_like 'a null dependency tracker'
|
200
|
+
|
201
|
+
it 'changes predecessors of item A' do
|
202
|
+
expect { subject }.to change { store.objects_causing_outdatedness_of(item_a) }
|
203
|
+
.from([]).to([item_b, item_c])
|
204
|
+
end
|
205
|
+
|
206
|
+
example do
|
207
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
208
|
+
end
|
209
|
+
|
210
|
+
example do
|
211
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
212
|
+
end
|
213
|
+
end
|
214
|
+
|
215
|
+
context 'enter + bounce + enter' do
|
216
|
+
subject do
|
217
|
+
tracker.enter(item_a)
|
218
|
+
tracker.bounce(item_b)
|
219
|
+
tracker.enter(item_c)
|
220
|
+
end
|
221
|
+
|
222
|
+
it_behaves_like 'a null dependency tracker'
|
223
|
+
|
224
|
+
it 'changes predecessors of item A' do
|
225
|
+
expect { subject }.to change { store.objects_causing_outdatedness_of(item_a) }
|
226
|
+
.from([]).to([item_b, item_c])
|
227
|
+
end
|
228
|
+
|
229
|
+
example do
|
230
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_b) }
|
231
|
+
end
|
232
|
+
|
233
|
+
example do
|
234
|
+
expect { subject }.not_to change { store.objects_causing_outdatedness_of(item_c) }
|
235
|
+
end
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|