Commit 2463beb1 authored by Robert Speicher's avatar Robert Speicher
Browse files

Don't use `raise_error` without a parameter

parent 98329c93
......@@ -38,7 +38,8 @@ describe Variable do
it 'fails to decrypt if iv is incorrect' do
subject.encrypted_value_iv = nil
subject.instance_variable_set(:@value, nil)
expect { subject.value }.to raise_error
expect { subject.value }.
to raise_error(OpenSSL::Cipher::CipherError, 'bad decrypt')
end
end
end
......@@ -56,9 +56,8 @@ describe WebHook do
it "catches exceptions" do
WebHook.should_receive(:post).and_raise("Some HTTP Post error")
lambda {
@web_hook.execute(@data)
}.should raise_error
expect { @web_hook.execute(@data) }.
to raise_error(RuntimeError, 'Some HTTP Post error')
end
end
end
......@@ -147,7 +147,7 @@ describe API::API do
delete api("/projects/#{project.id}"), options
response.status.should == 200
expect { project.reload }.to raise_error
expect { project.reload }.to raise_error(ActiveRecord::RecordNotFound)
end
it "non-manager is not authorized" do
......
......@@ -17,7 +17,8 @@ describe CreateProjectService do
context 'without project dump' do
it 'should raise exception' do
expect { service.execute(current_user, '', '') }.to raise_error
expect { service.execute(current_user, '', '') }.
to raise_error(NoMethodError)
end
end
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment