Class: ViewLoadingTest
- Inherits:
-
ActionController::TestCase
- Object
- ActionController::TestCase
- ViewLoadingTest
- Defined in:
- vendor/plugins/engines/test/functional/view_loading_test.rb
Instance Method Summary
- - (Object) setup
-
- (Object) test_should_be_able_to_load_a_layout_from_a_plugin
layouts loaded from plugins.
- - (Object) test_WITH_a_namespaced_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app
- - (Object) test_WITH_a_namespaced_view_defined_in_two_plugins_IT_should_find_the_latter_of_both
- - (Object) test_WITH_a_namespaced_view_defined_only_in_a_plugin_IT_should_find_the_view
-
- (Object) test_WITH_a_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app
app takes precedence over plugins.
-
- (Object) test_WITH_a_view_defined_in_two_plugins_IT_should_find_the_latter_of_both
subsequently loaded plugins take precendence over previously loaded plugins.
-
- (Object) test_WITH_a_view_defined_only_in_a_plugin_IT_should_find_the_view
plugin views should be found.
Instance Method Details
- (Object) setup
11 12 13 14 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 11 def setup @request = ActionController::TestRequest.new @response = ActionController::TestResponse.new end |
- (Object) test_should_be_able_to_load_a_layout_from_a_plugin
layouts loaded from plugins
54 55 56 57 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 54 def test_should_be_able_to_load_a_layout_from_a_plugin get_action_on_controller :action_with_layout, :alpha_plugin assert_response_body 'rendered in AlphaPluginController#action_with_layout (with plugin layout)' end |
- (Object) test_WITH_a_namespaced_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app
35 36 37 38 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 35 def test_WITH_a_namespaced_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app get_action_on_controller :a_view, :app_and_plugin, :namespace assert_response_body 'namespace/app_and_plugin/a_view (from app)' end |
- (Object) test_WITH_a_namespaced_view_defined_in_two_plugins_IT_should_find_the_latter_of_both
47 48 49 50 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 47 def test_WITH_a_namespaced_view_defined_in_two_plugins_IT_should_find_the_latter_of_both get_action_on_controller :a_view, :shared_plugin, :namespace assert_response_body 'namespace/shared_plugin/a_view (from beta_plugin)' end |
- (Object) test_WITH_a_namespaced_view_defined_only_in_a_plugin_IT_should_find_the_view
23 24 25 26 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 23 def test_WITH_a_namespaced_view_defined_only_in_a_plugin_IT_should_find_the_view get_action_on_controller :a_view, :alpha_plugin, :namespace assert_response_body 'namespace/alpha_plugin/a_view' end |
- (Object) test_WITH_a_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app
app takes precedence over plugins
30 31 32 33 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 30 def test_WITH_a_view_defined_in_both_app_and_plugin_IT_should_find_the_one_in_app get_action_on_controller :a_view, :app_and_plugin assert_response_body 'app_and_plugin/a_view (from app)' end |
- (Object) test_WITH_a_view_defined_in_two_plugins_IT_should_find_the_latter_of_both
subsequently loaded plugins take precendence over previously loaded plugins
42 43 44 45 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 42 def test_WITH_a_view_defined_in_two_plugins_IT_should_find_the_latter_of_both get_action_on_controller :a_view, :shared_plugin assert_response_body 'shared_plugin/a_view (from beta_plugin)' end |
- (Object) test_WITH_a_view_defined_only_in_a_plugin_IT_should_find_the_view
plugin views should be found
18 19 20 21 |
# File 'vendor/plugins/engines/test/functional/view_loading_test.rb', line 18 def test_WITH_a_view_defined_only_in_a_plugin_IT_should_find_the_view get_action_on_controller :a_view, :alpha_plugin assert_response_body 'alpha_plugin/a_view' end |