| 
									
										
										
										
											2021-01-31 14:50:29 -05:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require "software_spec" | 
					
						
							| 
									
										
										
										
											2024-04-12 10:41:55 -04:00
										 |  |  | require "test/support/fixtures/testball_bottle" | 
					
						
							| 
									
										
										
										
											2021-01-31 14:50:29 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-12 10:41:55 -04:00
										 |  |  | 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) | 
					
						
							| 
									
										
										
										
											2021-01-31 14:50:29 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-04-12 10:41:55 -04:00
										 |  |  |       expect(bottle.filename.to_s).to eq("testball_bottle--0.1.arm64_big_sur.bottle.tar.gz") | 
					
						
							| 
									
										
										
										
											2021-01-31 14:50:29 -05:00
										 |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |