Skip to content

Commit

Permalink
Config Travis bld to only run tests in test dir
Browse files Browse the repository at this point in the history
  • Loading branch information
rkeithhill committed Jan 15, 2018
1 parent 07ea92c commit 8097c28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
- pwsh -c 'Install-Module Pester -Scope CurrentUser'

script:
- pwsh -c 'Import-Module Pester; Invoke-Pester -EnableExit'
- pwsh -c 'Import-Module Pester; Invoke-Pester -Script test -EnableExit'
17 changes: 5 additions & 12 deletions chocolatey/tests/InstallChocolatey.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
$packageName = "poshgit"
if (($PSVersionTable.PSVersion.Major -lt 6) -or $IsWindows) {
cpack
$binRoot = join-path $env:systemdrive 'tools'
if($null -ne $env:chocolatey_bin_root){$binRoot = join-path $env:systemdrive $env:chocolatey_bin_root}
$poshgitPath = join-path $binRoot 'poshgit'
if(Test-Path $Profile) { $currentProfileScript = (Get-Content $Profile) }
}
cpack

function Setup-Environment {
Cleanup
Expand All @@ -26,17 +20,16 @@ function Clean-Temp {
function RunInstall {
cinst $packageName -source (Resolve-Path .)
}
$binRoot = join-path $env:systemdrive 'tools'
if($null -ne $env:chocolatey_bin_root){$binRoot = join-path $env:systemdrive $env:chocolatey_bin_root}
$poshgitPath = join-path $binRoot 'poshgit'
if(Test-Path $Profile) { $currentProfileScript = (Get-Content $Profile) }

function Clean-Environment {
Set-Content $Profile -value $currentProfileScript -Force
}

Describe "Install-Posh-Git" {
BeforeAll {
if (($PSVersionTable.PSVersion.Major -ge 6) -and !$IsWindows) {
$PSDefaultParameterValues["it:skip"] = $true
}
}
It "WillRemvePreviousInstallVersion" {
Setup-Environment
try{
Expand Down

0 comments on commit 8097c28

Please sign in to comment.