aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/fixtures/plugins/engines/engine
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/fixtures/plugins/engines/engine')
-rw-r--r--railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb10
-rw-r--r--railties/test/fixtures/plugins/engines/engine/init.rb2
2 files changed, 11 insertions, 1 deletions
diff --git a/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb b/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb
new file mode 100644
index 0000000000..d67a127ca7
--- /dev/null
+++ b/railties/test/fixtures/plugins/engines/engine/app/metal/engine_metal.rb
@@ -0,0 +1,10 @@
+class EngineMetal
+ def self.call(env)
+ if env["PATH_INFO"] =~ /^\/metal/
+ [200, {"Content-Type" => "text/html"}, ["Engine metal"]]
+ else
+ [404, {"Content-Type" => "text/html"}, ["Not Found"]]
+ end
+ end
+end
+
diff --git a/railties/test/fixtures/plugins/engines/engine/init.rb b/railties/test/fixtures/plugins/engines/engine/init.rb
index f4b00c0fa4..64e9ae6c30 100644
--- a/railties/test/fixtures/plugins/engines/engine/init.rb
+++ b/railties/test/fixtures/plugins/engines/engine/init.rb
@@ -1,3 +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)
+raise LoadError, 'missing model from my app/models dir' unless defined?(EngineModel)