Files
runner-images/images/macos/scripts/tests/Ruby.arm64.Tests.ps1
Alexey-Ayupov 69db5c6c63 [macOS] Refactor Common.Helpers (#8924)
* [macOS] Refactor Common.Helpers

* Update readme file

* Remove unnecessary double quotes

---------

Co-authored-by: Alexey Ayupov <“alexey.ayupov@akvelon.com”>
2023-12-04 12:13:08 +01:00

27 lines
851 B
PowerShell

Import-Module "$PSScriptRoot/../helpers/Common.Helpers.psm1"
Import-Module "$PSScriptRoot/Helpers.psm1" -DisableNameChecking
$os = Get-OSVersion
Describe "Ruby" -Skip:(-not $os.IsArm64) {
It "Ruby is available" {
"ruby --version" | Should -ReturnZeroExitCode
}
It "Ruby is installed via HomeBrew" {
Get-ToolPath "ruby" | Should -Not -BeLike "/usr/bin/ruby*"
}
It "Ruby tools are consistent" {
$expectedPrefix = "/opt/homebrew"
Get-ToolPath "ruby" | Should -Match "$($expectedPrefix)*"
Get-ToolPath "gem" | Should -Match "$($expectedPrefix)*"
Get-ToolPath "bundler" | Should -Match "$($expectedPrefix)*"
}
It "Ruby gems permissions are valid" {
"gem install bundle" | Should -ReturnZeroExitCode
"gem uninstall bundle" | Should -ReturnZeroExitCode
}
}