Update specs to exclude possible false positive pass

This commit is contained in:
blackst0ne 2018-12-18 10:21:30 +11:00
parent 6964e51053
commit 236876f278
5 changed files with 10 additions and 5 deletions

View file

@ -0,0 +1,5 @@
---
title: Update specs to exclude possible false positive pass
merge_request: 23893
author: "@blackst0ne"
type: other

View file

@ -124,7 +124,7 @@ describe Gitlab::EncodingHelper do
end
it 'returns empty string on conversion errors' do
expect { ext_class.encode_utf8('') }.not_to raise_error(ArgumentError)
expect { ext_class.encode_utf8('') }.not_to raise_error
end
context 'with strings that can be forcefully encoded into utf8' do

View file

@ -137,7 +137,7 @@ describe Gitlab::Gpg do
described_class.using_tmp_keychain do
end
end
end.not_to raise_error(ThreadError)
end.not_to raise_error
end
end
end

View file

@ -43,7 +43,7 @@ shared_examples 'ChronicDurationAttribute writer' do
end
it "doesn't raise exception" do
expect { subject.send("#{virtual_field}=", '-10m') }.not_to raise_error(ChronicDuration::DurationParseError)
expect { subject.send("#{virtual_field}=", '-10m') }.not_to raise_error
end
it "doesn't change value" do
@ -87,7 +87,7 @@ shared_examples 'ChronicDurationAttribute writer' do
end
it "doesn't raise exception" do
expect { subject.send("#{virtual_field}=", nil) }.not_to raise_error(NoMethodError)
expect { subject.send("#{virtual_field}=", nil) }.not_to raise_error
end
end
end

View file

@ -1358,7 +1358,7 @@ describe MergeRequest do
it 'does not raises a NameError exception' do
allow_any_instance_of(service_class_name.constantize).to receive(:execute).and_return(nil)
expect { subject }.not_to raise_error(NameError)
expect { subject }.not_to raise_error
end
end
end