<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>test/lib/render_information.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -172,18 +172,29 @@ namespace :test do
   
   desc 'Update the plugin and tests files in the test application from the plugin'
   task :mirror_engine_files =&gt; [:test_app, :copy_engines_plugin] do
-    puts &quot;&gt; Modifying default config files to load engines plugin&quot;
+    puts &quot;&gt; Tweaking generated application to be suitable for testing&quot;
+    
+    # Replace the Rails plugin loader with the engines one.
     insert_line(&quot;require File.join(File.dirname(__FILE__), '../vendor/plugins/engines/boot')&quot;,
                 :into =&gt; 'config/environment.rb',
                 :after =&gt; &quot;require File.join(File.dirname(__FILE__), 'boot')&quot;)
-                
-    insert_line('map.from_plugin :test_routing', :into =&gt; 'config/routes.rb', 
-                :after =&gt; /\AActionController::Routing::Routes/)
-                
+    
+    # Add the engines test helper to handle fixtures &amp; stuff.
     insert_line(&quot;require 'engines_test_helper'&quot;, :into =&gt; 'test/test_helper.rb')
     
+    # Run engine plugin tests when running the application 
     insert_line(&quot;task :test =&gt; ['test:engines:all']&quot;, :into =&gt; 'Rakefile')
     
+    # We want exceptions to be raised
+    insert_line(&quot;def rescue_action(e) raise e end;&quot;, 
+                :into =&gt; &quot;app/controllers/application_controller.rb&quot;,
+                :after =&gt; &quot;class ApplicationController &lt; ActionController::Base&quot;)
+    
+    # We need this method to test where actions are being rendered from.
+    insert_line(&quot;include RenderInformation&quot;, 
+                :into =&gt; &quot;app/controllers/application_controller.rb&quot;,
+                :after =&gt; &quot;class ApplicationController &lt; ActionController::Base&quot;)
+    
     puts &quot;&gt; Mirroring test application files into #{test_app_dir}&quot;
     mirror_test_files('app')
     mirror_test_files('lib')</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -1,5 +1,5 @@
 # Only call Engines.init once, in the after_initialize block so that Rails
 # plugin reloading works when turned on
 config.after_initialize do
-  Engines.init if defined? :Engines
-end
+  Engines.init(initializer) if defined? :Engines
+end
\ No newline at end of file</diff>
      <filename>init.rb</filename>
    </modified>
    <modified>
      <diff>@@ -43,7 +43,7 @@ module Engines
   
   # List of extensions to load, can be changed in init.rb before calling Engines.init
   mattr_accessor :rails_extensions
-  self.rails_extensions = %w(action_mailer asset_helpers form_tag_helpers routing migrations dependencies)
+  self.rails_extensions = %w(asset_helpers form_tag_helpers migrations dependencies)
   
   # The name of the public directory to mirror public engine assets into.
   # Defaults to &lt;tt&gt;RAILS_ROOT/public/plugin_assets&lt;/tt&gt;.
@@ -81,7 +81,7 @@ module Engines
   self.code_mixing_file_types = %w(controller helper)
   
   class &lt;&lt; self
-    def init
+    def init(initializer)
       load_extensions
       Engines::Assets.initialize_base_public_directory
     end</diff>
      <filename>lib/engines.rb</filename>
    </modified>
    <modified>
      <diff>@@ -75,7 +75,6 @@ module Engines
     def load(initializer)
       return if loaded?
       super initializer
-      add_plugin_view_paths
       add_plugin_locale_paths
       Assets.mirror_files_for(self)
     end    
@@ -86,13 +85,6 @@ module Engines
       Engines.select_existing_paths(self.send(name).map { |p| File.join(directory, p) })
     end    
 
-    def add_plugin_view_paths
-      view_path = File.join(directory, 'app', 'views')
-      if File.exist?(view_path)
-        ActionController::Base.view_paths.insert(1, view_path) # push it just underneath the app
-      end
-    end
-
     def add_plugin_locale_paths
       locale_path = File.join(directory, 'locales')
       return unless File.exists?(locale_path)
@@ -112,11 +104,6 @@ module Engines
       &quot;#{File.basename(Engines.public_directory)}/#{name}&quot;
     end
     
-    # The path to this plugin's routes file
-    def routes_path
-      File.join(directory, &quot;routes.rb&quot;)
-    end
-
     # The directory containing this plugin's migrations (&lt;tt&gt;plugin/db/migrate&lt;/tt&gt;)
     def migration_directory
       File.join(self.directory, 'db', 'migrate')</diff>
      <filename>lib/engines/plugin.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,14 +5,7 @@ module Engines
         def register_plugin_as_loaded(plugin)
           super plugin
           Engines.plugins &lt;&lt; plugin
-          register_to_routing(plugin)
         end    
-        
-        # Registers the plugin's controller_paths for the routing system. 
-        def register_to_routing(plugin)
-          initializer.configuration.controller_paths += plugin.select_existing_paths(:controller_paths)
-          initializer.configuration.controller_paths.uniq!
-        end
     end
   end
 end
\ No newline at end of file</diff>
      <filename>lib/engines/plugin/loader.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
 
 require File.dirname(__FILE__) + '/../test_helper'
 
-class ControllerLoadingTest &lt; Test::Unit::TestCase
+class ControllerLoadingTest &lt; ActionController::TestCase
   def setup
     @request    = ActionController::TestRequest.new
     @response   = ActionController::TestResponse.new</diff>
      <filename>test/functional/controller_loading_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 require File.dirname(__FILE__) + '/../test_helper'
 
-class ExceptionNotificationCompatibilityTest &lt; Test::Unit::TestCase
+class ExceptionNotificationCompatibilityTest &lt; ActionController::TestCase
   ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bill@schmoe.com)
   class SimpleController &lt; ApplicationController
     include ExceptionNotifiable</diff>
      <filename>test/functional/exception_notification_compatibility_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -5,7 +5,7 @@
 
 require File.dirname(__FILE__) + '/../test_helper'
 
-class LocaleLoadingTest &lt; Test::Unit::TestCase
+class LocaleLoadingTest &lt; ActionController::TestCase
   def setup
     @request    = ActionController::TestRequest.new
     @response   = ActionController::TestResponse.new</diff>
      <filename>test/functional/locale_loading_test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,7 +7,7 @@
 
 require File.dirname(__FILE__) + '/../test_helper'
 
-class ViewLoadingTest &lt; Test::Unit::TestCase
+class ViewLoadingTest &lt; ActionController::TestCase
   def setup
     @request    = ActionController::TestRequest.new
     @response   = ActionController::TestResponse.new</diff>
      <filename>test/functional/view_loading_test.rb</filename>
    </modified>
  </modified>
  <removed type="array">
    <removed>
      <filename>lib/engines/rails_extensions/action_mailer.rb</filename>
    </removed>
    <removed>
      <filename>lib/engines/rails_extensions/routing.rb</filename>
    </removed>
    <removed>
      <filename>test/app/controllers/application.rb</filename>
    </removed>
  </removed>
  <parents type="array">
    <parent>
      <id>15ebe4bfae9127c8502c03db879c3436ee4193fb</id>
    </parent>
  </parents>
  <author>
    <name>James Adam</name>
    <email>james@lazyatom.com</email>
  </author>
  <url>http://github.com/lazyatom/engines/commit/a57772ac0c6fab7a64501f8cfe811a10a371afe0</url>
  <id>a57772ac0c6fab7a64501f8cfe811a10a371afe0</id>
  <committed-date>2009-04-20T02:25:54-07:00</committed-date>
  <authored-date>2009-04-20T02:25:54-07:00</authored-date>
  <message>Initial steps towards compatability with Rails 2.3. Removed routing and ActionMailer extensions, and we no longer need to add view paths from plugins.</message>
  <tree>10a205167620d184f704c948439299cf2ffe7b58</tree>
  <committer>
    <name>James Adam</name>
    <email>james@lazyatom.com</email>
  </committer>
</commit>
