test/livecheck/skip_conditions_spec: Even better context wording
				
					
				
			Co-authored-by: Nanda H. Krishna <nanda.harishankar@gmail.com>
This commit is contained in:
		
							parent
							
								
									83ead25229
								
							
						
					
					
						commit
						dfebf71e26
					
				@ -265,56 +265,56 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe "::skip_conditions" do
 | 
			
		||||
    context "when the formula is deprecated without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is deprecated" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:deprecated]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:deprecated])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is disabled without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is disabled" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:disabled]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:disabled])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is versioned without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is versioned" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:versioned]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:versioned])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is HEAD-only and not installed" do
 | 
			
		||||
    context "when a formula is HEAD-only and not installed" do
 | 
			
		||||
      it "skips " do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:head_only]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:head_only])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a GitHub Gist stable URL" do
 | 
			
		||||
    context "when a formula has a GitHub Gist stable URL" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:gist]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:gist])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a Google Code Archive stable URL" do
 | 
			
		||||
    context "when a formula has a Google Code Archive stable URL" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:google_code_archive]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:google_code_archive])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has an Internet Archive stable URL" do
 | 
			
		||||
    context "when a formula has an Internet Archive stable URL" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:internet_archive]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:internet_archive])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a `livecheck` block containing `skip`" do
 | 
			
		||||
    context "when a formula has a `livecheck` block containing `skip`" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(formulae[:skip]))
 | 
			
		||||
          .to eq(status_hashes[:formula][:skip])
 | 
			
		||||
@ -324,21 +324,21 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when a cask is discontinued without a livecheckable" do
 | 
			
		||||
    context "when a cask without a livecheckable is discontinued" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(casks[:discontinued]))
 | 
			
		||||
          .to eq(status_hashes[:cask][:discontinued])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when a cask has `version :latest` without a livecheckable" do
 | 
			
		||||
    context "when a cask without a livecheckable has `version :latest`" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(casks[:latest]))
 | 
			
		||||
          .to eq(status_hashes[:cask][:latest])
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when a cask has an unversioned URL without a livecheckable" do
 | 
			
		||||
    context "when a cask without a livecheckable has an unversioned URL" do
 | 
			
		||||
      it "skips" do
 | 
			
		||||
        expect(skip_conditions.skip_information(casks[:unversioned]))
 | 
			
		||||
          .to eq(status_hashes[:cask][:unversioned])
 | 
			
		||||
@ -365,7 +365,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  describe "::print_skip_information" do
 | 
			
		||||
    context "when the formula is deprecated without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is deprecated" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:deprecated]) }
 | 
			
		||||
          .to output("test_deprecated : deprecated\n").to_stdout
 | 
			
		||||
@ -373,7 +373,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is disabled without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is disabled" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:disabled]) }
 | 
			
		||||
          .to output("test_disabled : disabled\n").to_stdout
 | 
			
		||||
@ -381,7 +381,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is versioned without a livecheckable" do
 | 
			
		||||
    context "when a formula without a livecheckable is versioned" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:versioned]) }
 | 
			
		||||
          .to output("test@0.0.1 : versioned\n").to_stdout
 | 
			
		||||
@ -389,7 +389,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula is HEAD-only and not installed" do
 | 
			
		||||
    context "when a formula is HEAD-only and not installed" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:head_only]) }
 | 
			
		||||
          .to output("test_head_only : HEAD only formula must be installed to be livecheckable\n").to_stdout
 | 
			
		||||
@ -397,7 +397,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a GitHub Gist stable URL" do
 | 
			
		||||
    context "when a formula has a GitHub Gist stable URL" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:gist]) }
 | 
			
		||||
          .to output("test_gist : skipped - Stable URL is a GitHub Gist\n").to_stdout
 | 
			
		||||
@ -405,7 +405,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a Google Code Archive stable URL" do
 | 
			
		||||
    context "when a formula has a Google Code Archive stable URL" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:google_code_archive]) }
 | 
			
		||||
          .to output("test_google_code_archive : skipped - Stable URL is from Google Code Archive\n").to_stdout
 | 
			
		||||
@ -413,7 +413,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has an Internet Archive stable URL" do
 | 
			
		||||
    context "when a formula has an Internet Archive stable URL" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:internet_archive]) }
 | 
			
		||||
          .to output("test_internet_archive : skipped - Stable URL is from Internet Archive\n").to_stdout
 | 
			
		||||
@ -421,7 +421,7 @@ describe Homebrew::Livecheck::SkipConditions do
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    context "when the formula has a `livecheck` block containing `skip`" do
 | 
			
		||||
    context "when a formula has a `livecheck` block containing `skip`" do
 | 
			
		||||
      it "prints skip information" do
 | 
			
		||||
        expect { skip_conditions.print_skip_information(status_hashes[:formula][:skip]) }
 | 
			
		||||
          .to output("test_skip : skipped\n").to_stdout
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user