| 
									
										
										
										
											2019-04-19 15:38:03 +09:00
										 |  |  | # frozen_string_literal: true | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-10-03 10:49:58 +02:00
										 |  |  | require_relative "shared_examples/invalid_option" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2018-09-06 08:29:14 +02:00
										 |  |  | describe Cask::Cmd::Doctor, :cask do | 
					
						
							| 
									
										
										
										
											2017-10-03 10:49:58 +02:00
										 |  |  |   it_behaves_like "a command that handles invalid options" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |   it "displays some nice info about the environment" do | 
					
						
							|  |  |  |     expect { | 
					
						
							| 
									
										
										
										
											2018-09-06 06:07:43 +02:00
										 |  |  |       described_class.run | 
					
						
							|  |  |  |     }.to output(/^==> Homebrew Version/).to_stdout | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   it "raises an exception when arguments are given" do | 
					
						
							|  |  |  |     expect { | 
					
						
							| 
									
										
										
										
											2018-09-06 06:07:43 +02:00
										 |  |  |       described_class.run("argument") | 
					
						
							| 
									
										
										
										
											2016-08-18 22:11:42 +03:00
										 |  |  |     }.to raise_error(ArgumentError) | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |