 45806f6a97
			
		
	
	
		45806f6a97
		
	
	
	
	
		
			
			Currently the tests casks found in "/Homebrew/test/support/fixtures/cask/Casks" and "/Homebrew/test/support/fixtures/third-party/Casks" aren't included in the paths checked when running "brew cask style". This change includes these test cask paths in the checked paths, and also includes the auto style fixes made by running `brew cask style --fix`.
		
			
				
	
	
		
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| # frozen_string_literal: true
 | |
| 
 | |
| describe Cask::Cmd::InternalStanza, :cask do
 | |
|   it "shows stanza of the Specified Cask" do
 | |
|     command = described_class.new("homepage", "local-caffeine")
 | |
|     expect {
 | |
|       command.run
 | |
|     }.to output("https://brew.sh/\n").to_stdout
 | |
|   end
 | |
| 
 | |
|   it "raises an exception when stanza is unknown/unsupported" do
 | |
|     expect {
 | |
|       described_class.new("this_stanza_does_not_exist", "local-caffeine")
 | |
|     }.to raise_error(%r{Unknown/unsupported stanza})
 | |
|   end
 | |
| 
 | |
|   it "raises an exception when normal stanza is not present on cask" do
 | |
|     command = described_class.new("caveats", "local-caffeine")
 | |
|     expect {
 | |
|       command.run
 | |
|     }.to raise_error(/no such stanza/)
 | |
|   end
 | |
| 
 | |
|   it "raises an exception when artifact stanza is not present on cask" do
 | |
|     command = described_class.new("zap", "local-caffeine")
 | |
|     expect {
 | |
|       command.run
 | |
|     }.to raise_error(/no such stanza/)
 | |
|   end
 | |
| 
 | |
|   it "raises an exception when 'depends_on' stanza is not present on cask" do
 | |
|     command = described_class.new("depends_on", "local-caffeine")
 | |
|     expect {
 | |
|       command.run
 | |
|     }.to raise_error(/no such stanza/)
 | |
|   end
 | |
| 
 | |
|   it "shows all artifact stanzas when using 'artifacts' keyword" do
 | |
|     command = described_class.new("artifacts", "local-caffeine")
 | |
|     expect {
 | |
|       command.run
 | |
|     }.to output(/Caffeine\.app/).to_stdout
 | |
|   end
 | |
| end
 |