diff options
-rw-r--r-- | spec/lib/gitlab/ldap/config_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/popen_spec.rb | 2 | ||||
-rw-r--r-- | spec/lib/gitlab/satellite/merge_action_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/commit_range_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/hooks/service_hook_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/hooks/web_hook_spec.rb | 2 | ||||
-rw-r--r-- | spec/requests/api/api_helpers_spec.rb | 16 | ||||
-rw-r--r-- | spec/services/archive_repository_service_spec.rb | 2 |
8 files changed, 16 insertions, 16 deletions
diff --git a/spec/lib/gitlab/ldap/config_spec.rb b/spec/lib/gitlab/ldap/config_spec.rb index 00e9076c787..3548d647c84 100644 --- a/spec/lib/gitlab/ldap/config_spec.rb +++ b/spec/lib/gitlab/ldap/config_spec.rb @@ -14,7 +14,7 @@ describe Gitlab::LDAP::Config do end 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 diff --git a/spec/lib/gitlab/popen_spec.rb b/spec/lib/gitlab/popen_spec.rb index cd9d0456b25..f80d306cfc6 100644 --- a/spec/lib/gitlab/popen_spec.rb +++ b/spec/lib/gitlab/popen_spec.rb @@ -28,7 +28,7 @@ describe 'Gitlab::Popen', no_db: true do context 'unsafe string command' 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 diff --git a/spec/lib/gitlab/satellite/merge_action_spec.rb b/spec/lib/gitlab/satellite/merge_action_spec.rb index 915e3ff0e51..5cc8b0f21fb 100644 --- a/spec/lib/gitlab/satellite/merge_action_spec.rb +++ b/spec/lib/gitlab/satellite/merge_action_spec.rb @@ -27,7 +27,7 @@ describe 'Gitlab::Satellite::MergeAction' do context 'between branches' 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 @@ -75,7 +75,7 @@ describe 'Gitlab::Satellite::MergeAction' do context 'between branches' 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 diff --git a/spec/models/commit_range_spec.rb b/spec/models/commit_range_spec.rb index e7fb43ff335..e3ab4812464 100644 --- a/spec/models/commit_range_spec.rb +++ b/spec/models/commit_range_spec.rb @@ -14,7 +14,7 @@ describe CommitRange do let(:range2) { described_class.new("#{sha_from}..#{sha_to}") } 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 describe '#to_s' do diff --git a/spec/models/hooks/service_hook_spec.rb b/spec/models/hooks/service_hook_spec.rb index fb5111dd9f5..a218b327d76 100644 --- a/spec/models/hooks/service_hook_spec.rb +++ b/spec/models/hooks/service_hook_spec.rb @@ -52,7 +52,7 @@ describe ServiceHook do expect { @service_hook.execute(@data) - }.to raise_error + }.to raise_error(RuntimeError) end end end diff --git a/spec/models/hooks/web_hook_spec.rb b/spec/models/hooks/web_hook_spec.rb index 4c3f0cbcbbf..b51e6b4e619 100644 --- a/spec/models/hooks/web_hook_spec.rb +++ b/spec/models/hooks/web_hook_spec.rb @@ -73,7 +73,7 @@ describe ProjectHook do expect { @project_hook.execute(@data, 'push_hooks') - }.to raise_error + }.to raise_error(RuntimeError) end end end diff --git a/spec/requests/api/api_helpers_spec.rb b/spec/requests/api/api_helpers_spec.rb index 9a4102c752d..4048c297013 100644 --- a/spec/requests/api/api_helpers_spec.rb +++ b/spec/requests/api/api_helpers_spec.rb @@ -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 set_env(user, admin.id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(user, admin.id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_env(user, admin.username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(user, admin.username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should throw an error when the user cannot be found for a given id" do @@ -86,10 +86,10 @@ describe API, api: true do expect(user.id).not_to eq(id) expect(admin.id).not_to eq(id) set_env(admin, id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(admin, id) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should throw an error when the user cannot be found for a given username" do @@ -97,10 +97,10 @@ describe API, api: true do expect(user.username).not_to eq(username) expect(admin.username).not_to eq(username) set_env(admin, username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) set_param(admin, username) - expect { current_user }.to raise_error + expect { current_user }.to raise_error(Exception) end it "should handle sudo's to oneself" do diff --git a/spec/services/archive_repository_service_spec.rb b/spec/services/archive_repository_service_spec.rb index f168a913976..c22426fccdb 100644 --- a/spec/services/archive_repository_service_spec.rb +++ b/spec/services/archive_repository_service_spec.rb @@ -19,7 +19,7 @@ describe ArchiveRepositoryService do it "raises an error" do expect { subject.execute(timeout: 0.0) - }.to raise_error + }.to raise_error(RuntimeError) end end |