Files
ubicloud/rhizome/common/spec/arch_class_spec.rb
Jeremy Evans 076304091b Streamline Arch class in rhizome
Avoid excess case folding and string/symbol conversions. At the cost
of an allocation, condense the `render` method.

Also, remove the defaults from `Arch.render`: they were never used for
convenience, and deteriorate its exhaustive checking advantage.
2025-04-29 16:45:24 -07:00

13 lines
408 B
Ruby

# frozen_string_literal: true
require_relative "../lib/arch"
RSpec.describe ArchClass do
describe "#render" do
it "selects the user string of the matching architecture" do
expect(described_class.new(:x64).render(x64: "test-x64", arm64: "test-arm64")).to eq("test-x64")
expect(described_class.new(:arm64).render(x64: "test-x64", arm64: "test-arm64")).to eq("test-arm64")
end
end
end