public
Description: Demonstrates a reference implementation for handling role management
Homepage: http://www.pluginaweek.org
Clone URL: git://github.com/pluginaweek/has_roles.git
obrie (author)
Tue Jun 09 20:33:30 -0700 2009
commit  f11c42e22d8fb21c0a66f8e2bbba2c07e61dc945
tree    b26b54e365efbec9246acb25cf28fb65ce459b28
parent  15109522112393f66418c799f19a80607c577615
has_roles / test / test_helper.rb
100644 19 lines (15 sloc) 0.476 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Load the plugin testing framework
$:.unshift("#{File.dirname(__FILE__)}/../../plugin_test_helper/lib")
require 'rubygems'
require 'plugin_test_helper'
 
# Run the migrations
ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
 
# Mixin the factory helper
require File.expand_path("#{File.dirname(__FILE__)}/factory")
Test::Unit::TestCase.class_eval do
  include Factory
end
 
# Remove defaults for testing
RolePermission.delete_all
Permission.delete_all
Role.delete_all