2023-05-12 13:30:13 +02:00
|
|
|
Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
|
2023-11-28 02:25:03 +01:00
|
|
|
Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
|
2023-05-12 13:30:13 +02:00
|
|
|
|
|
|
|
|
$os = Get-OSVersion
|
|
|
|
|
|
2023-11-10 18:53:24 +01:00
|
|
|
Describe "Ruby" -Skip:(-not $os.IsArm64) {
|
2023-05-12 13:30:13 +02:00
|
|
|
It "Ruby is available" {
|
|
|
|
|
"ruby --version" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Ruby is installed via HomeBrew" {
|
2023-12-04 12:13:08 +01:00
|
|
|
Get-ToolPath "ruby" | Should -Not -BeLike "/usr/bin/ruby*"
|
2023-05-12 13:30:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Ruby tools are consistent" {
|
|
|
|
|
$expectedPrefix = "/opt/homebrew"
|
2023-12-04 12:13:08 +01:00
|
|
|
Get-ToolPath "ruby" | Should -Match "$($expectedPrefix)*"
|
|
|
|
|
Get-ToolPath "gem" | Should -Match "$($expectedPrefix)*"
|
|
|
|
|
Get-ToolPath "bundler" | Should -Match "$($expectedPrefix)*"
|
2023-05-12 13:30:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
It "Ruby gems permissions are valid" {
|
|
|
|
|
"gem install bundle" | Should -ReturnZeroExitCode
|
|
|
|
|
"gem uninstall bundle" | Should -ReturnZeroExitCode
|
|
|
|
|
}
|
|
|
|
|
}
|