-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
executable file
·40 lines (31 loc) · 1.67 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
== Authorization Test Application
This is a test application (and new application scaffold) for the Authorization
plugin with Object Roles table support. The Authorization plugin is described
in vendors/plugins/authorization/README (or check nicely formatted HTML docs in
that plugin directory /doc).
Prerequisites:
- Ruby on Rails v 2.0.2 or higher
- The Ruby Sqlite3 gem is installed and functional. You can use MySQL for the tests but will need to manually create the databases needed and add them to 'config/database.yml' yourself.
Running the Tests:
- Make sure you have the correct authorization plugin which gets included as a git sub-module:
- first time:
- git submodule init
- git submodule update
- to pick up later updates to the plugin sub-module do something like:
- cd vendor/plugins/authorization
- git checkout master
- git remote update
- cd ../../../
- rake test
(Note: Learn more about using submodules here : http://woss.name/2008/04/09/using-git-submodules-to-track-vendorrails/ )
- Make sure /config/database.yml has the correct settings for your DB (Default Sqlite3).
- Run the migration using "rake db:migrate" or reset the DB with "rake db:migrate:reset"
- Run 'rake test' from the root of the test application.
Optional manual tests:
- Start an instance of the mongrel webserver by running './script/server'
- Surf to http://localhost:3000 and try out the sample application.
Things to look at:
* The integration tests in /test/integration. Enter "rake test:integration" to run them.
* The migration scripts in /db/migrate.
* Notice how you can mix hardwired roles in your code with database roles.
http://www.writertopia.com/developers