diff options
| author | Adam Smith | 2017-09-27 00:17:47 -0700 | 
|---|---|---|
| committer | Adam Smith | 2017-09-30 18:25:12 -0700 | 
| commit | 92311901c9d85e0e43147386535118b66ca718cd (patch) | |
| tree | fc87fcca3515b415b94c001f8e9e6eac5d3c9d93 /Library/Homebrew/test/cask/cli | |
| parent | a1140f7b926ce7b87727a6cd105cbe2d788f3a4c (diff) | |
| download | brew-92311901c9d85e0e43147386535118b66ca718cd.tar.bz2 | |
add available languages to cask info command
add language tests for dsl
add fixtures, tests for languages info output
add extra lines
Diffstat (limited to 'Library/Homebrew/test/cask/cli')
| -rw-r--r-- | Library/Homebrew/test/cask/cli/info_spec.rb | 32 | 
1 files changed, 32 insertions, 0 deletions
diff --git a/Library/Homebrew/test/cask/cli/info_spec.rb b/Library/Homebrew/test/cask/cli/info_spec.rb index aec7080de..7d6dfd76d 100644 --- a/Library/Homebrew/test/cask/cli/info_spec.rb +++ b/Library/Homebrew/test/cask/cli/info_spec.rb @@ -90,6 +90,38 @@ describe Hbc::CLI::Info, :cask do      EOS    end +  it "should print languages if the Cask provided any" do +    expect { +      Hbc::CLI::Info.run("with-languages") +    }.to output(<<-EOS.undent).to_stdout +      with-languages: 1.2.3 +      http://example.com/local-caffeine +      Not installed +      From: https://github.com/caskroom/homebrew-spec/blob/master/Casks/with-languages.rb +      ==> Name +      None +      ==> Languages +      zh, en-US +      ==> Artifacts +      Caffeine.app (App) +    EOS +  end + +  it 'should not print "Languages" section divider if the languages block has no output' do +    expect { +      Hbc::CLI::Info.run("with-conditional-languages") +    }.to output(<<-EOS.undent).to_stdout +      with-conditional-languages: 1.2.3 +      http://example.com/local-caffeine +      Not installed +      From: https://github.com/caskroom/homebrew-spec/blob/master/Casks/with-conditional-languages.rb +      ==> Name +      None +      ==> Artifacts +      Caffeine.app (App) +    EOS +  end +    describe "when no Cask is specified" do      it "raises an exception" do        expect {  | 
