roles_data_mapper 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,23 +0,0 @@
1
- require 'spec_helper'
2
- use_roles_strategy :many_roles
3
-
4
- class User
5
- include DataMapper::Resource
6
- include Roles::DataMapper
7
-
8
- strategy :many_roles, :default
9
- role_class :role
10
-
11
- property :id, Serial
12
- property :name, String
13
- end
14
-
15
- DataMapper.finalize
16
- DataMapper.auto_migrate!
17
-
18
- User.valid_roles_are :admin, :guest
19
-
20
- describe "Roles for DataMapper: :many_roles strategy" do
21
- require "roles_data_mapper/user_setup"
22
- require "roles_generic/rspec/api"
23
- end
@@ -1,23 +0,0 @@
1
- require 'spec_helper'
2
- use_roles_strategy :one_role
3
-
4
- class User
5
- include DataMapper::Resource
6
- include Roles::DataMapper
7
-
8
- strategy :one_role, :default
9
- role_class :role
10
-
11
- property :id, Serial
12
- property :name, String
13
- end
14
-
15
- DataMapper.finalize
16
- DataMapper.auto_migrate!
17
-
18
- User.valid_roles_are :admin, :guest
19
-
20
- describe "Roles for DataMapper: :one_role strategy" do
21
- require "roles_data_mapper/user_setup"
22
- require "roles_generic/rspec/api"
23
- end
@@ -1,22 +0,0 @@
1
- require 'spec_helper'
2
- use_roles_strategy :role_string
3
-
4
- class User
5
- include DataMapper::Resource
6
- include Roles::DataMapper
7
-
8
- strategy :role_string, :default
9
-
10
- property :id, Serial
11
- property :name, String
12
- end
13
-
14
- DataMapper.finalize
15
- DataMapper.auto_migrate!
16
-
17
- User.valid_roles_are :admin, :guest
18
-
19
- describe "Roles for DataMapper: :role_string strategy" do
20
- require "roles_data_mapper/user_setup"
21
- require "roles_generic/rspec/api"
22
- end