brew/Library/Homebrew/test/linux_runner_spec_spec.rb
Mike McQuaid d661cffc1f
Switch to using main as the default branch
Homebrew/brew has moved to a `main` default branch so we can more move
references from `master` to `main`.
2025-06-24 11:14:57 +01:00

29 lines
732 B
Ruby

# frozen_string_literal: true
require "linux_runner_spec"
RSpec.describe LinuxRunnerSpec do
let(:spec) do
described_class.new(
name: "Linux",
runner: "ubuntu-latest",
container: { image: "ghcr.io/homebrew/ubuntu22.04:main", options: "--user=linuxbrew" },
workdir: "/github/home",
timeout: 360,
cleanup: false,
)
end
it "has immutable attributes" do
[:name, :runner, :container, :workdir, :timeout, :cleanup].each do |attribute|
expect(spec.respond_to?(:"#{attribute}=")).to be(false)
end
end
describe "#to_h" do
it "returns an object that responds to `#to_json`" do
expect(spec.to_h.respond_to?(:to_json)).to be(true)
end
end
end