Skip to content

Commit

Permalink
Fix Pester test
Browse files Browse the repository at this point in the history
  • Loading branch information
erik-bershel committed Nov 21, 2024
1 parent 02c7b91 commit e8cb00a
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions images/macos/scripts/tests/Ruby.Tests.ps1
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking

$os = Get-OSVersion

Describe "Ruby" {
It "Ruby is available" {
"ruby --version" | Should -ReturnZeroExitCode
Expand All @@ -13,14 +11,11 @@ Describe "Ruby" {
}

It "Ruby tools are consistent" {
if ($os.IsArm64) {
$expectedPrefix = "/opt/homebrew"
} else {
$expectedPrefix = "/usr/local"
}
Get-ToolPath "ruby" | Should -Match "$($expectedPrefix)*"
Get-ToolPath "gem" | Should -Match "$($expectedPrefix)*"
Get-ToolPath "bundler" | Should -Match "$($expectedPrefix)*"
$os = Get-OSVersion
$expectedPrefix = if ($os.IsArm64) { "/opt/homebrew" } else { "/usr/local" }
Get-ToolPath "ruby" | Should -Match "^$expectedPrefix.*"
Get-ToolPath "gem" | Should -Match "^$expectedPrefix.*"
Get-ToolPath "bundler" | Should -Match "^$expectedPrefix.*"
}

It "Ruby gems permissions are valid" {
Expand Down

0 comments on commit e8cb00a

Please sign in to comment.