Changeset 262

Show
Ignore:
Timestamp:
01/31/06 08:49:09 (3 years ago)
Author:
lazyatom
Message:

Added a bunch more controllers, views, tests and documentation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • applications/engines_test/app/controllers/application.rb

    r254 r262  
    22# Likewise, all the methods added will be available for all controllers. 
    33class ApplicationController < ActionController::Base 
    4   helper :my 
     4  #helper :my 
    55end 
  • applications/engines_test/config

    • Property svn:ignore changed from
      database.yml
      to
      database.yml
      lighttpd.conf
  • applications/engines_test/doc

    • Property svn:ignore set to
      plugins
  • applications/engines_test/doc/README_FOR_APP

    r194 r262  
    1 Use this README file to introduce your application and point to useful places in the API for learning more. 
    2 Run "rake appdoc" to generate API documentation for your models and controllers. 
     1Using the Engines Test Application 
     2================================== 
     3 
     4Since the Engines plugin isn't like normal plugins (it gets pretty deep into Rails), I've constructed a test application to verify that Engine behaviour works as expected. Here's how to use it: 
     5 
     6 
     71. Select the version of Rails you want. 
     8 
     9  rake switch_rails_1.0.0 
     10  rake switch_rails_edge 
     11   
     12... will both do just what you expect. This is important since versions of the Engines plugin are tied quite closely to particular versions of Rails. 
     13 
     14 
     152. Create your database.yml. 
     16 
     17Since I don't know your setup, you'll need to set this up yourself. I've included an example. 
     18 
     19 
     203. Create the database tables. 
     21 
     22There's a schema right there, use rake db_schema_import to load it up. 
     23 
     24 
     254. Run the tests 
     26 
     27  rake test_plugins PLUGIN=engines 
     28  rake test_units 
     29  rake test_functional 
     30   
     31This will do the actual testing. Here's an example of the sort of things that I'm checking work: 
     32 
     33* Engines priorities & load orders 
     34* Models and libraries are loadable from Engines 
     35* Models and libraries in RAILS_ROOT/lib are loaded in preference to anything in Engines 
     36* Controllers and views can be loaded from Engines 
     37* Controllers and views can be mixed in and overridden in other engines, and from the application 
     38* Controllers can be placed in modules without breaking mixing or overriding. 
  • applications/engines_test/test/unit/engines_test.rb

    r256 r262  
    2626    assert_equal "1.0.1", Engines.get(:beta).version 
    2727    assert_equal "1.0.2", Engines.get(:gamma).version 
    28     assert_equal "Unknown", Engines.get(:delta).version 
     28    assert_equal "unknown", Engines.get(:delta).version 
    2929  end 
    3030   
  • applications/engines_test/vendor

    • Property svn:externals set to
      rails_1.0.0 http://dev.rubyonrails.org/svn/rails/tags/rel_1-0-0
      rails_edge http://dev.rubyonrails.org/svn/rails/trunk/
    • Property svn:ignore set to
      rails