summaryrefslogtreecommitdiff
path: root/spec/policies
diff options
context:
space:
mode:
authorRémy Coutable <remy@rymai.me>2017-07-25 19:09:00 +0200
committerRémy Coutable <remy@rymai.me>2017-07-27 14:31:53 +0200
commitcddc5cacfb833fbd188d2f5982381f66dd3eee3b (patch)
treede3e7bda37c8b7f0eb5586695d6d871484dc44e2 /spec/policies
parentddccd24c1388dadc057ac3c4c0a49f3fea847292 (diff)
downloadgitlab-ce-cddc5cacfb833fbd188d2f5982381f66dd3eee3b.tar.gz
Use described_class when possible
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/policies')
-rw-r--r--spec/policies/global_policy_spec.rb2
-rw-r--r--spec/policies/user_policy_spec.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/spec/policies/global_policy_spec.rb b/spec/policies/global_policy_spec.rb
index 2a590e12232..a6bf70c1e09 100644
--- a/spec/policies/global_policy_spec.rb
+++ b/spec/policies/global_policy_spec.rb
@@ -4,7 +4,7 @@ describe GlobalPolicy do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
- subject { GlobalPolicy.new(current_user, [user]) }
+ subject { described_class.new(current_user, [user]) }
describe "reading the list of users" do
context "for a logged in user" do
diff --git a/spec/policies/user_policy_spec.rb b/spec/policies/user_policy_spec.rb
index 67ab239e4c8..6593a6ca3b9 100644
--- a/spec/policies/user_policy_spec.rb
+++ b/spec/policies/user_policy_spec.rb
@@ -4,7 +4,7 @@ describe UserPolicy do
let(:current_user) { create(:user) }
let(:user) { create(:user) }
- subject { UserPolicy.new(current_user, user) }
+ subject { described_class.new(current_user, user) }
describe "reading a user's information" do
it { is_expected.to be_allowed(:read_user) }