| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-12 21:46:15 +01:00
										 |  |  | require "emoji" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe Emoji do | 
					
						
							|  |  |  |   describe "#install_badge" do | 
					
						
							|  |  |  |     subject { described_class.install_badge } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-03-25 13:30:37 +01:00
										 |  |  |     before do | 
					
						
							| 
									
										
										
										
											2017-02-26 13:51:47 +11:00
										 |  |  |       ENV.delete("HOMEBREW_INSTALL_BADGE") | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-27 11:51:44 +11:00
										 |  |  |     it "returns 🍺  by default" do | 
					
						
							| 
									
										
										
										
											2017-02-12 21:46:15 +01:00
										 |  |  |       expect(subject).to eq "🍺" | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     it "returns the contents of HOMEBREW_INSTALL_BADGE if set" do | 
					
						
							|  |  |  |       ENV["HOMEBREW_INSTALL_BADGE"] = "foo" | 
					
						
							|  |  |  |       expect(subject).to eq "foo" | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |