aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb2
-rw-r--r--railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb2
-rw-r--r--railties/test/fixtures/plugins/engines/engine/config/routes.rb3
-rw-r--r--railties/test/fixtures/plugins/engines/engine/init.rb3
-rw-r--r--railties/test/initializer_test.rb1
-rw-r--r--railties/test/plugin_locator_test.rb2
6 files changed, 12 insertions, 1 deletions
diff --git a/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb b/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb
new file mode 100644
index 0000000000..f08373de40
--- /dev/null
+++ b/railties/test/fixtures/plugins/engines/engine/app/controllers/engine_controller.rb
@@ -0,0 +1,2 @@
+class EngineController < ActionController::Base
+end \ No newline at end of file
diff --git a/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb b/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb
new file mode 100644
index 0000000000..e265712185
--- /dev/null
+++ b/railties/test/fixtures/plugins/engines/engine/app/models/engine_model.rb
@@ -0,0 +1,2 @@
+class EngineModel
+end \ No newline at end of file
diff --git a/railties/test/fixtures/plugins/engines/engine/config/routes.rb b/railties/test/fixtures/plugins/engines/engine/config/routes.rb
new file mode 100644
index 0000000000..cca8d1b146
--- /dev/null
+++ b/railties/test/fixtures/plugins/engines/engine/config/routes.rb
@@ -0,0 +1,3 @@
+ActionController::Routing::Routes.draw do |map|
+ map.connect '/engine', :controller => "engine"
+end
diff --git a/railties/test/fixtures/plugins/engines/engine/init.rb b/railties/test/fixtures/plugins/engines/engine/init.rb
new file mode 100644
index 0000000000..f4b00c0fa4
--- /dev/null
+++ b/railties/test/fixtures/plugins/engines/engine/init.rb
@@ -0,0 +1,3 @@
+# My app/models dir must be in the load path.
+require 'engine_model'
+raise 'missing model from my app/models dir' unless defined?(EngineModel)
diff --git a/railties/test/initializer_test.rb b/railties/test/initializer_test.rb
index 88c267b58e..2104412c54 100644
--- a/railties/test/initializer_test.rb
+++ b/railties/test/initializer_test.rb
@@ -252,6 +252,7 @@ uses_mocha "Initializer plugin loading tests" do
assert $LOAD_PATH.include?(File.join(plugin_fixture_path('default/acts/acts_as_chunky_bacon'), 'lib'))
end
+
private
def load_plugins!
diff --git a/railties/test/plugin_locator_test.rb b/railties/test/plugin_locator_test.rb
index 363fa27f15..5a8c651e5a 100644
--- a/railties/test/plugin_locator_test.rb
+++ b/railties/test/plugin_locator_test.rb
@@ -47,7 +47,7 @@ uses_mocha "Plugin Locator Tests" do
end
def test_should_return_all_plugins_found_under_the_set_plugin_paths
- assert_equal ["a", "acts_as_chunky_bacon", "gemlike", "plugin_with_no_lib_dir", "stubby"].sort, @locator.plugins.map(&:name).sort
+ assert_equal ["a", "acts_as_chunky_bacon", "engine", "gemlike", "plugin_with_no_lib_dir", "stubby"].sort, @locator.plugins.map(&:name).sort
end
def test_should_find_plugins_only_under_the_plugin_paths_set_in_configuration