| 
									
										
										
										
											2017-02-27 11:55:14 +01:00
										 |  |  | require "dependable" | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | describe Dependable do | 
					
						
							| 
									
										
										
										
											2017-05-09 23:00:51 +02:00
										 |  |  |   alias_matcher :be_a_build_dependency, :be_build | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2017-02-27 11:55:14 +01:00
										 |  |  |   subject { double(tags: tags).extend(described_class) } | 
					
						
							|  |  |  |   let(:tags) { ["foo", "bar", :build] } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   specify "#options" do | 
					
						
							|  |  |  |     expect(subject.options.as_flags.sort).to eq(%w[--foo --bar].sort) | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   specify "#build?" do | 
					
						
							|  |  |  |     expect(subject).to be_a_build_dependency | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   specify "#optional?" do | 
					
						
							|  |  |  |     expect(subject).not_to be_optional | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |   specify "#recommended?" do | 
					
						
							|  |  |  |     expect(subject).not_to be_recommended | 
					
						
							|  |  |  |   end | 
					
						
							|  |  |  | end |