mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Fix startDirectory
Needed to move initial tests below the assignment
This commit is contained in:
1 parent
89ea2ea6d5
commit
6ee20b8f71
1 file changed
+23
-23
@@ -1,32 +1,32 @@
|
||||
Describe "Set-Location" {
|
||||
It "Should be able to be called without error" {
|
||||
{ Set-Location / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to be called on different providers" {
|
||||
{ Set-Location alias: } | Should Not Throw
|
||||
{ Set-Location env: } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able use the cd alias without error" {
|
||||
{ cd / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the chdir alias without error" {
|
||||
{ chdir / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the sl alias without error" {
|
||||
{ sl / } | Should Not Throw
|
||||
}
|
||||
|
||||
Context "Functionality testing" {
|
||||
$startDirectory = "$env:HOME/src/pester-tests"
|
||||
$startDirectory = Get-Location
|
||||
|
||||
It "Should be able to be called without error" {
|
||||
{ Set-Location / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to be called on different providers" {
|
||||
{ Set-Location alias: } | Should Not Throw
|
||||
{ Set-Location env: } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able use the cd alias without error" {
|
||||
{ cd / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the chdir alias without error" {
|
||||
{ chdir / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should be able to use the sl alias without error" {
|
||||
{ sl / } | Should Not Throw
|
||||
}
|
||||
|
||||
It "Should have the correct current location when using the set-location cmdlet" {
|
||||
Set-Location $startDirectory
|
||||
|
||||
$(Get-Location).Path | Should Be $startDirectory
|
||||
$(Get-Location).Path | Should Be $startDirectory.Path
|
||||
}
|
||||
|
||||
It "Should have the correct current location when using the cd alias" {
|
||||
|
||||
Reference in new issue
Block a user