diff options
author | Douwe Maan <douwe@gitlab.com> | 2017-05-02 22:30:30 +0000 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2017-05-02 22:30:30 +0000 |
commit | 2a73f0a638d4268dd367346dd602910f777742f4 (patch) | |
tree | f73ca298187d04074b98b6e3c02c2e8a7c23d671 /spec/controllers | |
parent | 920d55b9f8afd35e16351fb57d671acf66092e89 (diff) | |
parent | d49768296ce596bbbbdf8412c362d9999ce822a4 (diff) | |
download | gitlab-ce-2a73f0a638d4268dd367346dd602910f777742f4.tar.gz |
Merge branch 'rs-described_class-cop-2' into 'master'
Enable `RSpec/DescribedClass` cop and correct violations
See merge request !10930
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 760f33b09c1..1bf0533ca24 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -4,7 +4,7 @@ describe ApplicationController do let(:user) { create(:user) } describe '#check_password_expiration' do - let(:controller) { ApplicationController.new } + let(:controller) { described_class.new } it 'redirects if the user is over their password expiry' do user.password_expires_at = Time.new(2002) @@ -34,7 +34,7 @@ describe ApplicationController do describe "#authenticate_user_from_token!" do describe "authenticating a user from a private token" do - controller(ApplicationController) do + controller(described_class) do def index render text: "authenticated" end @@ -66,7 +66,7 @@ describe ApplicationController do end describe "authenticating a user from a personal access token" do - controller(ApplicationController) do + controller(described_class) do def index render text: 'authenticated' end @@ -115,7 +115,7 @@ describe ApplicationController do end context 'two-factor authentication' do - let(:controller) { ApplicationController.new } + let(:controller) { described_class.new } describe '#check_two_factor_requirement' do subject { controller.send :check_two_factor_requirement } |