2023-04-07 22:21:46 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require "macos_runner_spec"
|
|
|
|
|
|
|
|
describe MacOSRunnerSpec do
|
2023-04-25 17:05:05 +08:00
|
|
|
let(:spec) { described_class.new(name: "macOS 11-arm64", runner: "11-arm64", timeout: 90, cleanup: true) }
|
2023-04-07 22:21:46 +08:00
|
|
|
|
|
|
|
it "has immutable attributes" do
|
2023-04-25 17:05:05 +08:00
|
|
|
[:name, :runner, :timeout, :cleanup].each do |attribute|
|
2023-12-18 09:34:01 -08:00
|
|
|
expect(spec.respond_to?(:"#{attribute}=")).to be(false)
|
2023-04-07 22:21:46 +08:00
|
|
|
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
|