attestation_spec: simplify gh_executable test
Signed-off-by: William Woodruff <william@yossarian.net>
This commit is contained in:
		
							parent
							
								
									990b7d77d6
								
							
						
					
					
						commit
						480e48b75d
					
				@ -11,13 +11,12 @@ RSpec.describe Homebrew::Attestation do
 | 
				
			|||||||
  let(:fake_bottle) { instance_double(Bottle, cached_download:) }
 | 
					  let(:fake_bottle) { instance_double(Bottle, cached_download:) }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  describe "::gh_executable" do
 | 
					  describe "::gh_executable" do
 | 
				
			||||||
    before do
 | 
					    it "calls ensure_executable" do
 | 
				
			||||||
      allow(attestation).to receive(:ensure_executable!)
 | 
					      expect(attestation).to receive(:ensure_executable!)
 | 
				
			||||||
 | 
					        .with("gh")
 | 
				
			||||||
        .and_return(fake_gh)
 | 
					        .and_return(fake_gh)
 | 
				
			||||||
    end
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it "returns a path to a gh executable" do
 | 
					      attestation.gh_executable
 | 
				
			||||||
      attestation.gh_executable == fake_gh
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user