diff options
| author | Markus Reiter | 2017-02-03 14:05:07 +0100 |
|---|---|---|
| committer | Markus Reiter | 2017-02-12 23:06:35 +0100 |
| commit | e70d28cba1b42c555f025b7beb13f67d2df5a067 (patch) | |
| tree | 5237b664f5f5bb29f48a7568daf819f4041ebbb8 /Library/Homebrew/cask | |
| parent | f48857d24657c2cf9c8d01c781ba270cff52c8a0 (diff) | |
| download | brew-e70d28cba1b42c555f025b7beb13f67d2df5a067.tar.bz2 | |
Add test to check if `rubocop-cask` version is is outdated.
Diffstat (limited to 'Library/Homebrew/cask')
| -rw-r--r-- | Library/Homebrew/cask/spec/cask/cli/style_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/cask/spec/cask/cli/style_spec.rb b/Library/Homebrew/cask/spec/cask/cli/style_spec.rb index b0d34576a..106bfbb44 100644 --- a/Library/Homebrew/cask/spec/cask/cli/style_spec.rb +++ b/Library/Homebrew/cask/spec/cask/cli/style_spec.rb @@ -1,4 +1,6 @@ require "English" +require "open3" +require "rubygems" describe Hbc::CLI::Style do let(:args) { [] } @@ -77,6 +79,20 @@ describe Hbc::CLI::Style do expect { subject }.to raise_error(Hbc::CaskError) end end + + context "version" do + it "matches `HOMEBREW_RUBOCOP_VERSION`" do + stdout, status = Open3.capture2("gem", "dependency", "rubocop-cask", "--version", HOMEBREW_RUBOCOP_CASK_VERSION, "--pipe", "--remote") + + expect(status).to be_a_success + + requirement = Gem::Requirement.new(stdout.scan(/rubocop --version '(.*)'/).flatten.first) + version = Gem::Version.new(HOMEBREW_RUBOCOP_VERSION) + + expect(requirement).not_to be_none + expect(requirement).to be_satisfied_by(version) + end + end end describe "#cask_paths" do |
