royce 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -79,6 +79,12 @@ describe "Basic tests" do
79
79
  user.allowed_role?('user').must_equal true
80
80
  user.allowed_role?(:zxcv).must_equal false
81
81
  user.allowed_role?(:user).must_equal true
82
+
83
+ user_role = Royce::Role.find_or_create_by(name: 'user')
84
+ user.allowed_role?(user_role).must_equal true
85
+
86
+ bad_role = Royce::Role.find_or_create_by(name: 'zxcv')
87
+ user.allowed_role?(bad_role).must_equal false
82
88
  end
83
89
 
84
90
  it 'Has name methods' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: royce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Nash
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-21 00:00:00.000000000 Z
11
+ date: 2014-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -101,6 +101,7 @@ files:
101
101
  - test/dummy/config/locales/en.yml
102
102
  - test/dummy/config/routes.rb
103
103
  - test/dummy/config/secrets.yml
104
+ - test/dummy/db/development.sqlite3
104
105
  - test/dummy/db/migrate/20140817214831_create_users.rb
105
106
  - test/dummy/db/migrate/20140821050450_create_royce.rb
106
107
  - test/dummy/db/schema.rb
@@ -168,6 +169,7 @@ test_files:
168
169
  - test/dummy/config/routes.rb
169
170
  - test/dummy/config/secrets.yml
170
171
  - test/dummy/config.ru
172
+ - test/dummy/db/development.sqlite3
171
173
  - test/dummy/db/migrate/20140817214831_create_users.rb
172
174
  - test/dummy/db/migrate/20140821050450_create_royce.rb
173
175
  - test/dummy/db/schema.rb