| 
									
										
										
										
											2015-08-03 13:09:07 +01:00
										 |  |  | require "testing_env" | 
					
						
							| 
									
										
										
										
											2015-07-20 21:46:05 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | class CaveatsTests < Homebrew::TestCase | 
					
						
							|  |  |  |   def setup | 
					
						
							|  |  |  |     @f = formula { url "foo-1.0" } | 
					
						
							|  |  |  |     @c = Caveats.new @f | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   def test_f | 
					
						
							|  |  |  |     assert_equal @f, @c.f | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   def test_empty? | 
					
						
							|  |  |  |     assert @c.empty? | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     f = formula do | 
					
						
							|  |  |  |       url "foo-1.0" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |       def caveats | 
					
						
							|  |  |  |         "something" | 
					
						
							|  |  |  |       end | 
					
						
							|  |  |  |     end | 
					
						
							|  |  |  |     c = Caveats.new f | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     refute c.empty? | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |