Fix 'raise_error' WARNINGs.
rspec spews a warning when using raise_error without a specific error; add "RuntimeError" to all of these occurrences.
This commit is contained in:
parent
dc12124faf
commit
60a079a41e
|
@ -58,7 +58,8 @@ describe '#get_application_default' do
|
||||||
Dir.mktmpdir do |dir|
|
Dir.mktmpdir do |dir|
|
||||||
key_path = File.join(dir, 'does-not-exist')
|
key_path = File.join(dir, 'does-not-exist')
|
||||||
ENV[@var_name] = key_path
|
ENV[@var_name] = key_path
|
||||||
expect { Google::Auth.get_application_default(@scope) }.to raise_error
|
expect { Google::Auth.get_application_default(@scope) }.
|
||||||
|
to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -79,7 +80,7 @@ describe '#get_application_default' do
|
||||||
blk = proc do
|
blk = proc do
|
||||||
Google::Auth.get_application_default(@scope, connection: c)
|
Google::Auth.get_application_default(@scope, connection: c)
|
||||||
end
|
end
|
||||||
expect(&blk).to raise_error
|
expect(&blk).to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
stubs.verify_stubbed_calls
|
stubs.verify_stubbed_calls
|
||||||
end
|
end
|
||||||
|
|
|
@ -182,7 +182,7 @@ describe Google::Auth::ServiceAccountCredentials do
|
||||||
Dir.mktmpdir do |dir|
|
Dir.mktmpdir do |dir|
|
||||||
key_path = File.join(dir, 'does-not-exist')
|
key_path = File.join(dir, 'does-not-exist')
|
||||||
ENV[@var_name] = key_path
|
ENV[@var_name] = key_path
|
||||||
expect { @clz.from_env(@scope) }.to raise_error
|
expect { @clz.from_env(@scope) }.to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ describe Google::Auth::ServiceAccountJwtHeaderCredentials do
|
||||||
Dir.mktmpdir do |dir|
|
Dir.mktmpdir do |dir|
|
||||||
key_path = File.join(dir, 'does-not-exist')
|
key_path = File.join(dir, 'does-not-exist')
|
||||||
ENV[@var_name] = key_path
|
ENV[@var_name] = key_path
|
||||||
expect { clz.from_env }.to raise_error
|
expect { clz.from_env }.to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ describe Google::Auth::UserRefreshCredentials do
|
||||||
Dir.mktmpdir do |dir|
|
Dir.mktmpdir do |dir|
|
||||||
key_path = File.join(dir, 'does-not-exist')
|
key_path = File.join(dir, 'does-not-exist')
|
||||||
ENV[@var_name] = key_path
|
ENV[@var_name] = key_path
|
||||||
expect { @clz.from_env(@scope) }.to raise_error
|
expect { @clz.from_env(@scope) }.to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ describe Google::Auth::UserRefreshCredentials do
|
||||||
FileUtils.mkdir_p(File.dirname(key_path))
|
FileUtils.mkdir_p(File.dirname(key_path))
|
||||||
File.write(key_path, cred_json_text(missing))
|
File.write(key_path, cred_json_text(missing))
|
||||||
ENV[@var_name] = key_path
|
ENV[@var_name] = key_path
|
||||||
expect { @clz.from_env(@scope) }.to raise_error
|
expect { @clz.from_env(@scope) }.to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -170,7 +170,8 @@ describe Google::Auth::UserRefreshCredentials do
|
||||||
FileUtils.mkdir_p(File.dirname(key_path))
|
FileUtils.mkdir_p(File.dirname(key_path))
|
||||||
File.write(key_path, cred_json_text(missing))
|
File.write(key_path, cred_json_text(missing))
|
||||||
ENV['HOME'] = dir
|
ENV['HOME'] = dir
|
||||||
expect { @clz.from_well_known_path(@scope) }.to raise_error
|
expect { @clz.from_well_known_path(@scope) }.
|
||||||
|
to raise_error RuntimeError
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue