| 
									
										
										
										
											2017-02-12 21:46:15 +01:00
										 |  |  | require "emoji" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe Emoji do | 
					
						
							|  |  |  |   describe "#install_badge" do | 
					
						
							|  |  |  |     subject { described_class.install_badge } | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-26 13:51:47 +11:00
										 |  |  |     before(:each) do | 
					
						
							|  |  |  |       ENV.delete("HOMEBREW_NO_EMOJI") | 
					
						
							|  |  |  |       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 |