re-ordered tests to indicate a logical progression to facilitate

debugging
added tests to validate individual environmental variables
This commit is contained in:
Zachary Folwick 2015-08-24 15:04:50 -07:00
parent ed86ae170e
commit f919006d46

View file

@ -3,10 +3,18 @@
Get-Item ENV: | Should Not BeNullOrEmpty
}
It "Should have a nonempty PATH" {
$ENV:PATH | Should Not BeNullOrEmpty
}
It "Should contain /bin in the PATH" {
$ENV:PATH | Should Match "/bin"
}
It "Should be able to access the members of the environment variable" {
$expected = /bin/bash -c "cd ~ && pwd"
(Get-Item ENV:HOME).Value | Should Be $expected
(Get-Item ENV:HOME).Value | Should Be $expected
}
It "Should be able to set the environment variables" {
@ -17,17 +25,9 @@
}
It "Should contain /bin in the PATH" {
$ENV:PATH | Should Match "/bin"
}
It "Should have the correct HOSTNAME" {
$expected = /bin/bash -c hostname
$expected = /bin/hostname
$ENV:HOSTNAME | Should Be $expected
}
It "Should have a nonempty PATH" {
$ENV:PATH | Should Not BeNullOrEmpty
}
}