AController < TestController; inherit_views (the class)
- should be inherit views
- should have inherit view paths == ['a']
AController < TestController; inherit_views (an instance)
- should be inherit views
- should have inherit view paths == ['a']
- GET :in_abc should render a/in_abc
- GET :in_a should render a/in_a
- GET :in_ab should render a/in_ab
- GET :render_parent should render a/render_parent
- GET :inherited_template_path should render its contents
BController < TestController; inherit_views 'a' (the class)
- should be inherit views
- should have inherit view paths == ['b', 'a']
BController < TestController; inherit_views 'a' (an instance)
- should be inherit views
- should have inherit view paths == ['b', 'a']
- GET :in_first should render a/in_a
- GET :in_ab should render b/in_ab
- GET :in_b should render b/in_b
- GET :in_abc should render b/in_abc
- GET :render_parent should render a/render_parent inside b/render_parent
- GET :bad_render_parent should raise ActionView::TemplateError as there is no parent to render
- GET :partial_in_bc should render b/partial_in_bc & b/_partial_in_bc
- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
CController < BController (the class)
- should be inherit views
- should have inherit view paths == ['c', 'b', 'a']
CController < BController (an instance)
- should be inherit views
- should have inherit view paths == ['c', 'b', 'a']
- GET :in_a should render a/in_a
- GET :in_ab should render b/in_ab
- GET :in_b should render b/in_b
- GET :in_abc should render c/in_abc
- GET :in_c should render c/in_c
- GET :render_parent should render a/render_parent inside b/render_parent inside c/render_parent
- GET :partial_in_bc should render b/partial_in_bc then c/_partial_in_bc
- GET :partial_in_b should render b/partial_in_b & b/_partial_in_b
DController < AController; inherit_views 'other' (the class)
- should be inherit views
- should have inherit view paths == ['d', 'other', 'a']
DController < AController; inherit_views 'other' (an instance)
- should be inherit views
- should have inherit view paths == ['d', 'other', 'a']
NormalController
- GET :partial_from_c should render normal/partial_from_c, then c/_partial_in_bc
InheritViews controllers in production mode
- should have inherited_template_paths_cache
- should cache calls to find_inherited_template_path
- should maintain different caches in different classes
NoTemplateFinderController
- .file_exists_in_template? should call template.file_exists?
WithTemplateFinderController
- .file_exists_in_template? should call template.finder.file_exists?
Finished in 0.296507 seconds
43 examples, 0 failures