fixed up tests to test standards

This commit is contained in:
Zachary Folwick 2015-09-23 11:33:33 -07:00
parent 503dec41dc
commit 5c34c1d59b

View file

@ -1,31 +1,31 @@
Describe "Test-Get-PSDrive" {
It "Should not throw" {
Get-PSDrive | Should Not BeNullOrEmpty
Get-PSDrive | Should Not BeNullOrEmpty
}
It "Should have a name and a length property" {
(Get-PSDrive).Name | Should Not BeNullOrEmpty
(Get-PSDrive).Root.Length | Should Not BeLessThan 1
}
gdr | Should Not BeNullOrEmpty
(gdr).Name | Should Not BeNullOrEmpty
(gdr).Root.Length | Should Not BeLessThan 1
It "Should be able to be called with the gdr alias" {
{ gdr } | Should Not Throw
gdr | Should Not BeNullOrEmpty
}
It "Should return drive info"{
(Get-PSDrive Env).Name | Should Be Env
(Get-PSDrive /).Root | Should Be /
(Get-PSDrive /).Provider.Name | Should Be FileSystem
(gdr Env).Name | Should Be Env
(gdr /).Root | Should Be /
(gdr /).Provider.Name | Should Be FileSystem
}
It "Should be able to access switches"{
It "Should be able to access a drive using the PSProvider switch" {
(Get-PSDrive -PSProvider FileSystem).Name.Length | Should BeGreaterThan 0
(gdr -PSProvider FileSystem).Name.Length | Should BeGreaterThan 0
}
It "Should return true for a drive that does not exist"{
It "Should return true that a drive that does not exist"{
!(Get-PSDrive fake -ErrorAction SilentlyContinue) | Should Be $True
Get-PSDrive fake -ErrorAction SilentlyContinue | Should BeNullOrEmpty
}
}