mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

This came up in the AGM and has bothered me for years: let's actually split out `software_spec.rb` into one file per class, as is more typical in Ruby. This will make these classes easier to find.
18 lines
546 B
Ruby
18 lines
546 B
Ruby
# frozen_string_literal: true
|
|
|
|
require "bottle_specification"
|
|
require "test/support/fixtures/testball_bottle"
|
|
|
|
RSpec.describe Bottle do
|
|
describe "#filename" do
|
|
it "renders the bottle filename" do
|
|
bottle_spec = BottleSpecification.new
|
|
bottle_spec.sha256(arm64_big_sur: "deadbeef" * 8)
|
|
tag = Utils::Bottles::Tag.from_symbol :arm64_big_sur
|
|
bottle = described_class.new(TestballBottle.new, bottle_spec, tag)
|
|
|
|
expect(bottle.filename.to_s).to eq("testball_bottle--0.1.arm64_big_sur.bottle.tar.gz")
|
|
end
|
|
end
|
|
end
|