Skip to content
Snippets Groups Projects
Commit 0f627f1c authored by Robert Speicher's avatar Robert Speicher Committed by Dmitriy Zaporozhets
Browse files

Fix `raise_error` without an argument deprecation warnings

parent 8b1f1ab3
No related branches found
No related tags found
No related merge requests found
Loading
@@ -14,7 +14,7 @@ describe Gitlab::LDAP::Config do
Loading
@@ -14,7 +14,7 @@ describe Gitlab::LDAP::Config do
end end
   
it "raises an error if a unknow provider is used" do it "raises an error if a unknow provider is used" do
expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error expect{ Gitlab::LDAP::Config.new 'unknown' }.to raise_error(RuntimeError)
end end
end end
end end
Loading
@@ -28,7 +28,7 @@ describe 'Gitlab::Popen', no_db: true do
Loading
@@ -28,7 +28,7 @@ describe 'Gitlab::Popen', no_db: true do
   
context 'unsafe string command' do context 'unsafe string command' do
it 'raises an error when it gets called with a string argument' do it 'raises an error when it gets called with a string argument' do
expect { @klass.new.popen('ls', path) }.to raise_error expect { @klass.new.popen('ls', path) }.to raise_error(RuntimeError)
end end
end end
   
Loading
Loading
Loading
@@ -27,7 +27,7 @@ describe 'Gitlab::Satellite::MergeAction' do
Loading
@@ -27,7 +27,7 @@ describe 'Gitlab::Satellite::MergeAction' do
   
context 'between branches' do context 'between branches' do
it 'should raise exception -- not expected to be used by non forks' do it 'should raise exception -- not expected to be used by non forks' do
expect { Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between }.to raise_error expect { Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).commits_between }.to raise_error(RuntimeError)
end end
end end
end end
Loading
@@ -75,7 +75,7 @@ describe 'Gitlab::Satellite::MergeAction' do
Loading
@@ -75,7 +75,7 @@ describe 'Gitlab::Satellite::MergeAction' do
   
context 'between branches' do context 'between branches' do
it 'should get proper diffs' do it 'should get proper diffs' do
expect{ Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).diffs_between_satellite }.to raise_error expect{ Gitlab::Satellite::MergeAction.new(merge_request.author, merge_request).diffs_between_satellite }.to raise_error(RuntimeError)
end end
end end
end end
Loading
Loading
Loading
@@ -14,7 +14,7 @@ describe CommitRange do
Loading
@@ -14,7 +14,7 @@ describe CommitRange do
let(:range2) { described_class.new("#{sha_from}..#{sha_to}") } let(:range2) { described_class.new("#{sha_from}..#{sha_to}") }
   
it 'raises ArgumentError when given an invalid range string' do it 'raises ArgumentError when given an invalid range string' do
expect { described_class.new("Foo") }.to raise_error expect { described_class.new("Foo") }.to raise_error(ArgumentError)
end end
   
describe '#to_s' do describe '#to_s' do
Loading
Loading
Loading
@@ -52,7 +52,7 @@ describe ServiceHook do
Loading
@@ -52,7 +52,7 @@ describe ServiceHook do
   
expect { expect {
@service_hook.execute(@data) @service_hook.execute(@data)
}.to raise_error }.to raise_error(RuntimeError)
end end
end end
end end
Loading
@@ -73,7 +73,7 @@ describe ProjectHook do
Loading
@@ -73,7 +73,7 @@ describe ProjectHook do
   
expect { expect {
@project_hook.execute(@data, 'push_hooks') @project_hook.execute(@data, 'push_hooks')
}.to raise_error }.to raise_error(RuntimeError)
end end
end end
end end
Loading
@@ -72,13 +72,13 @@ describe API, api: true do
Loading
@@ -72,13 +72,13 @@ describe API, api: true do
   
it "should throw an error when the current user is not an admin and attempting to sudo" do it "should throw an error when the current user is not an admin and attempting to sudo" do
set_env(user, admin.id) set_env(user, admin.id)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
set_param(user, admin.id) set_param(user, admin.id)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
set_env(user, admin.username) set_env(user, admin.username)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
set_param(user, admin.username) set_param(user, admin.username)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
end end
   
it "should throw an error when the user cannot be found for a given id" do it "should throw an error when the user cannot be found for a given id" do
Loading
@@ -86,10 +86,10 @@ describe API, api: true do
Loading
@@ -86,10 +86,10 @@ describe API, api: true do
expect(user.id).not_to eq(id) expect(user.id).not_to eq(id)
expect(admin.id).not_to eq(id) expect(admin.id).not_to eq(id)
set_env(admin, id) set_env(admin, id)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
   
set_param(admin, id) set_param(admin, id)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
end end
   
it "should throw an error when the user cannot be found for a given username" do it "should throw an error when the user cannot be found for a given username" do
Loading
@@ -97,10 +97,10 @@ describe API, api: true do
Loading
@@ -97,10 +97,10 @@ describe API, api: true do
expect(user.username).not_to eq(username) expect(user.username).not_to eq(username)
expect(admin.username).not_to eq(username) expect(admin.username).not_to eq(username)
set_env(admin, username) set_env(admin, username)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
   
set_param(admin, username) set_param(admin, username)
expect { current_user }.to raise_error expect { current_user }.to raise_error(Exception)
end end
   
it "should handle sudo's to oneself" do it "should handle sudo's to oneself" do
Loading
Loading
Loading
@@ -19,7 +19,7 @@ describe ArchiveRepositoryService do
Loading
@@ -19,7 +19,7 @@ describe ArchiveRepositoryService do
it "raises an error" do it "raises an error" do
expect { expect {
subject.execute(timeout: 0.0) subject.execute(timeout: 0.0)
}.to raise_error }.to raise_error(RuntimeError)
end end
end end
   
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment