[core] Fixed credential tests
Tests behavior when ENV['HOME'] is not a directory.
This commit is contained in:
parent
e0432b6f1c
commit
e0b8606d85
|
@ -21,12 +21,17 @@ Shindo.tests do
|
|||
Fog.credentials_path
|
||||
}
|
||||
|
||||
returns('/home/me/.fog', 'falls back to home path if FOG_RC not set') {
|
||||
ENV['HOME'] = '/home/me'
|
||||
returns(File.join(ENV['HOME'], '.fog'), 'falls back to home path if FOG_RC not set') {
|
||||
ENV.delete('FOG_RC')
|
||||
Fog.credentials_path
|
||||
}
|
||||
|
||||
returns(nil, 'ignores home path if it does not exist') {
|
||||
ENV.delete('FOG_RC')
|
||||
ENV['HOME'] = '/no/such/path'
|
||||
Fog.credentials_path
|
||||
}
|
||||
|
||||
returns(nil, 'returns nil when neither FOG_RC or HOME are set') {
|
||||
ENV.delete('HOME')
|
||||
ENV.delete('FOG_RC')
|
||||
|
|
Loading…
Reference in New Issue