File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -226,6 +226,29 @@ class SubNestedPresenter < Curly::Presenter
226226 expect ( cache_key ) . to eq "Foo::BarPresenter/42/Foo::BumPresenter/1337"
227227 end
228228
229+ it "includes the cache keys of all presenters in the dependency list" do
230+ presenter = Class . new ( Curly ::Presenter ) do
231+ version 42
232+ depends_on 'foo/bum'
233+ depends_on 'foo/aum'
234+ end
235+
236+ dependency = Class . new ( Curly ::Presenter ) do
237+ version 1337
238+ end
239+
240+ dependency_2 = Class . new ( Curly ::Presenter ) do
241+ version 1338
242+ end
243+
244+ stub_const ( "Foo::BarPresenter" , presenter )
245+ stub_const ( "Foo::BumPresenter" , dependency )
246+ stub_const ( "Foo::AumPresenter" , dependency_2 )
247+
248+ cache_key = Foo ::BarPresenter . cache_key
249+ expect ( cache_key ) . to eq "Foo::BarPresenter/42/Foo::AumPresenter/1338/Foo::BumPresenter/1337"
250+ end
251+
229252 it "uses the view path of a dependency if there is no presenter for it" do
230253 presenter = Class . new ( Curly ::Presenter ) do
231254 version 42
You can’t perform that action at this time.
0 commit comments