livecheck: modified test
This commit is contained in:
		
							parent
							
								
									2550af57df
								
							
						
					
					
						commit
						062156365b
					
				@ -13,8 +13,8 @@ describe Homebrew::Livecheck do
 | 
				
			|||||||
      head "https://github.com/Homebrew/brew.git"
 | 
					      head "https://github.com/Homebrew/brew.git"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      livecheck do
 | 
					      livecheck do
 | 
				
			||||||
        url "https://github.s3.amazonaws.com/Homebrew/brew/releases/latest"
 | 
					        url "https://formulae.brew.sh/api/formula/ruby.json"
 | 
				
			||||||
        regex(%r{href=.*?/tag/v?(\d+(?:\.\d+)+)["' >]}i)
 | 
					        regex(/"stable":"(\d+(?:\.\d+)+)"/i)
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
@ -138,8 +138,10 @@ describe Homebrew::Livecheck do
 | 
				
			|||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  describe "::preprocess_url" do
 | 
					  describe "::preprocess_url" do
 | 
				
			||||||
 | 
					    let(:url) { "https://github.s3.amazonaws.com/Homebrew/brew/releases/latest" }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    it "returns the preprocessed URL for livecheck to use" do
 | 
					    it "returns the preprocessed URL for livecheck to use" do
 | 
				
			||||||
      expect(livecheck.preprocess_url(f.livecheck.url))
 | 
					      expect(livecheck.preprocess_url(url))
 | 
				
			||||||
        .to eq("https://github.com/Homebrew/brew/releases/latest")
 | 
					        .to eq("https://github.com/Homebrew/brew/releases/latest")
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user