language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
Homebrew
brew
10970a5c54c0723126bef3582f9e9a63d25e1b54.json
formula: clarify caveats usage.
Library/Homebrew/formula.rb
@@ -1026,7 +1026,9 @@ def run_post_install @prefix_returns_versioned_prefix = false end - # Tell the user about any caveats regarding this package. + # Tell the user about any Homebrew-specific caveats or locations regarding + # this package. These should not contain setup instructions that would apply + ...
false
Other
Homebrew
brew
92710c50c65beccfc2fca744cc8ee1be19a87aad.json
Convert Download Strategies test to spec.
Library/Homebrew/test/download_strategies_spec.rb
@@ -0,0 +1,232 @@ +require "download_strategy" + +describe AbstractDownloadStrategy do + subject { described_class.new(name, resource) } + let(:name) { "foo" } + let(:url) { "http://example.com/foo.tar.gz" } + let(:resource) { double(Resource, url: url, mirrors: [], specs: {}, version: nil) } + let(:args) { %w[foo...
true
Other
Homebrew
brew
92710c50c65beccfc2fca744cc8ee1be19a87aad.json
Convert Download Strategies test to spec.
Library/Homebrew/test/download_strategies_test.rb
@@ -1,245 +0,0 @@ -require "testing_env" -require "download_strategy" - -class ResourceDouble - attr_reader :url, :specs, :version, :mirrors - - def initialize(url = "http://example.com/foo.tar.gz", specs = {}) - @url = url - @specs = specs - @mirrors = [] - end -end - -class AbstractDownloadStrategyTests <...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/cask/lib/hbc/artifact/uninstall_base.rb
@@ -34,6 +34,10 @@ def self.expand_path_strings(path_strings) end end + def self.expand_glob(path_strings) + path_strings.flat_map(&Pathname.method(:glob)) + end + def self.remove_relative_path_strings(action, path_strings) relative = path_strings.map do |path_string| ...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb
@@ -7,7 +7,17 @@ Hbc::Artifact::Uninstall.new(cask, command: Hbc::FakeSystemCommand) } + let(:absolute_path) { Pathname.new("#{TEST_TMPDIR}/absolute_path") } + let(:path_with_tilde) { Pathname.new("#{TEST_TMPDIR}/path_with_tilde") } + let(:glob_path1) { Pathname.new("#{TEST_TMPDIR}/glob_path1") } + let(:g...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb
@@ -8,7 +8,17 @@ Hbc::Artifact::Zap.new(cask, command: Hbc::FakeSystemCommand) } + let(:absolute_path) { Pathname.new("#{TEST_TMPDIR}/absolute_path") } + let(:path_with_tilde) { Pathname.new("#{TEST_TMPDIR}/path_with_tilde") } + let(:glob_path1) { Pathname.new("#{TEST_TMPDIR}/glob_path1") } + let(:glob_pa...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/test/support/fixtures/cask/Casks/with-installable.rb
@@ -11,8 +11,9 @@ quit: 'my.fancy.package.app', login_item: 'Fancy', delete: [ - '/permissible/absolute/path', - '~/permissible/path/with/tilde', + "#{TEST_TMPDIR}/absolute_path", + ...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-delete.rb
@@ -8,8 +8,9 @@ pkg 'Fancy.pkg' uninstall delete: [ - '/permissible/absolute/path', - '~/permissible/path/with/tilde', + "#{TEST_TMPDIR}/absolute_path", + '~/path_with_tilde', + "#{TEST_TMPDIR}/glob_path*", ...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-trash.rb
@@ -8,8 +8,9 @@ pkg 'Fancy.pkg' uninstall trash: [ - '/permissible/absolute/path', - '~/permissible/path/with/tilde', + "#{TEST_TMPDIR}/absolute_path", + '~/path_with_tilde', + "#{TEST_TMPDIR}/glob_path*", ...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-delete.rb
@@ -8,8 +8,9 @@ pkg 'Fancy.pkg' zap delete: [ - '/permissible/absolute/path', - '~/permissible/path/with/tilde', + "#{TEST_TMPDIR}/absolute_path", + '~/path_with_tilde', + "#{TEST_TMPDIR}/glob_path*", 'impermissible/rela...
true
Other
Homebrew
brew
5c185eaa4355810ccc6617cb078ee67d4fa0777c.json
Expand glob patterns.
Library/Homebrew/test/support/fixtures/cask/Casks/with-zap-trash.rb
@@ -8,8 +8,9 @@ pkg 'Fancy.pkg' zap trash: [ - '/permissible/absolute/path', - '~/permissible/path/with/tilde', + "#{TEST_TMPDIR}/absolute_path", + '~/path_with_tilde', + "#{TEST_TMPDIR}/glob_path*", 'impermissible/relative/pa...
true
Other
Homebrew
brew
e622116f277b49eec59f663417210c1770dd8c5a.json
.simplecov: require English with capital E On case-sensitive filesystems, require "english" will fail with "cannot load such file -- english"
Library/Homebrew/.simplecov
@@ -1,6 +1,6 @@ #!/usr/bin/env ruby -require "english" +require "English" SimpleCov.start do coverage_dir File.expand_path("../test/coverage", File.realpath(__FILE__))
false
Other
Homebrew
brew
262f357d86f145fad3c78b3d843b32ac4e384f5e.json
Convert CompilerFailure test to spec.
Library/Homebrew/test/compiler_failure_spec.rb
@@ -0,0 +1,41 @@ +require "compilers" + +describe CompilerFailure do + matcher :fail_with do |expected| + match do |actual| + actual.fails_with?(expected) + end + end + + describe "::create" do + it "creates a failure when given a symbol" do + failure = described_class.create(:clang) + expect...
true
Other
Homebrew
brew
262f357d86f145fad3c78b3d843b32ac4e384f5e.json
Convert CompilerFailure test to spec.
Library/Homebrew/test/compiler_failure_test.rb
@@ -1,52 +0,0 @@ -require "testing_env" -require "compilers" - -class CompilerFailureTests < Homebrew::TestCase - Compiler = Struct.new(:name, :version) - - def assert_fails_with(compiler, failure) - assert_operator failure, :fails_with?, compiler - end - - def refute_fails_with(compiler, failure) - refute_op...
true
Other
Homebrew
brew
8736b6cee0d94c1927b7abaa3dbde0d3a0239b85.json
Convert Tty test to spec.
Library/Homebrew/test/utils/tty_spec.rb
@@ -0,0 +1,67 @@ +require "utils" + +describe Tty do + describe "::strip_ansi" do + it "removes ANSI escape codes from a string" do + expect(subject.strip_ansi("\033\[36;7mhello\033\[0m")).to eq("hello") + end + end + + describe "::width" do + it "returns an Integer" do + expect(subject.width).to ...
true
Other
Homebrew
brew
8736b6cee0d94c1927b7abaa3dbde0d3a0239b85.json
Convert Tty test to spec.
Library/Homebrew/test/utils/tty_test.rb
@@ -1,46 +0,0 @@ -require "testing_env" -require "utils" - -class TtyTests < Homebrew::TestCase - def test_strip_ansi - assert_equal "hello", Tty.strip_ansi("\033\[36;7mhello\033\[0m") - end - - def test_width - assert_kind_of Integer, Tty.width - end - - def test_truncate - Tty.stubs(:width).returns 15 -...
true
Other
Homebrew
brew
8fee9bf44dad59b422293b6eb37ac83435475b01.json
Convert MPIRequirement test to spec.
Library/Homebrew/test/mpi_requirement_spec.rb
@@ -0,0 +1,14 @@ +require "requirements/mpi_requirement" + +describe MPIRequirement do + describe "::new" do + subject { described_class.new(*(wrappers + tags)) } + let(:wrappers) { [:cc, :cxx, :f77] } + let(:tags) { [:optional, "some-other-tag"] } + + it "untangles wrappers and tags" do + expect(subj...
true
Other
Homebrew
brew
8fee9bf44dad59b422293b6eb37ac83435475b01.json
Convert MPIRequirement test to spec.
Library/Homebrew/test/mpi_requirement_test.rb
@@ -1,12 +0,0 @@ -require "testing_env" -require "requirements/mpi_requirement" - -class MPIRequirementTests < Homebrew::TestCase - def test_initialize_untangles_tags_and_wrapper_symbols - wrappers = [:cc, :cxx, :f77] - tags = [:optional, "some-other-tag"] - dep = MPIRequirement.new(*wrappers + tags) - ass...
true
Other
Homebrew
brew
99da779434bda113f50f4a17880d1dfcacd93d24.json
Convert Gpg test to spec.
Library/Homebrew/test/gpg_spec.rb
@@ -0,0 +1,21 @@ +require "gpg" + +describe Gpg do + subject { described_class } + + describe "::create_test_key" do + it "creates a test key in the home directory" do + skip "GPG Unavailable" unless subject.available? + + Dir.mktmpdir do |dir| + ENV["HOME"] = dir + dir = Pathname.new(dir) ...
true
Other
Homebrew
brew
99da779434bda113f50f4a17880d1dfcacd93d24.json
Convert Gpg test to spec.
Library/Homebrew/test/gpg_test.rb
@@ -1,18 +0,0 @@ -require "testing_env" -require "gpg" - -class GpgTest < Homebrew::TestCase - def setup - super - skip "GPG Unavailable" unless Gpg.available? - @dir = Pathname.new(mktmpdir) - end - - def test_create_test_key - Dir.chdir(@dir) do - ENV["HOME"] = @dir - shutup { Gpg.create_test...
true
Other
Homebrew
brew
779d9ce60fd931b5ac1819209bf00470703f6a55.json
Convert PkgVersion test to spec.
Library/Homebrew/test/pkg_version_spec.rb
@@ -0,0 +1,81 @@ +require "pkg_version" + +describe PkgVersion do + describe "::parse" do + it "parses versions from a string" do + expect(described_class.parse("1.0_1")).to eq(described_class.new(Version.create("1.0"), 1)) + expect(described_class.parse("1.0_1")).to eq(described_class.new(Version.create(...
true
Other
Homebrew
brew
779d9ce60fd931b5ac1819209bf00470703f6a55.json
Convert PkgVersion test to spec.
Library/Homebrew/test/pkg_version_test.rb
@@ -1,51 +0,0 @@ -require "testing_env" -require "pkg_version" - -class PkgVersionTests < Homebrew::TestCase - def v(version) - PkgVersion.parse(version) - end - - def test_parse - assert_equal PkgVersion.new(Version.create("1.0"), 1), PkgVersion.parse("1.0_1") - assert_equal PkgVersion.new(Version.create("...
true
Other
Homebrew
brew
f8ea9266410c0c2733b6de3c5a3e690842e7b9a8.json
Convert Language::Go test to spec.
Library/Homebrew/test/language/go_spec.rb
@@ -0,0 +1,15 @@ +require "language/go" + +describe Language::Go do + specify "#stage_deps" do + ENV.delete("HOMEBREW_DEVELOPER") + + expect(described_class).to receive(:opoo).once + + Dir.mktmpdir do |path| + shutup do + described_class.stage_deps [], path + end + end + end +end
true
Other
Homebrew
brew
f8ea9266410c0c2733b6de3c5a3e690842e7b9a8.json
Convert Language::Go test to spec.
Library/Homebrew/test/language_go_test.rb
@@ -1,17 +0,0 @@ -# -*- coding: UTF-8 -*- - -require "testing_env" -require "language/go" - -class LanguageGoTests < Homebrew::TestCase - def test_stage_deps_empty - if ARGV.homebrew_developer? - Language::Go.expects(:odie).once - else - Language::Go.expects(:opoo).once - end - mktmpdir do |path|...
true
Other
Homebrew
brew
ecb17f4f1d265e1625828565ecbbdac6d5f989c6.json
Add test for `uninstall` before removing artifacts.
Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb
@@ -41,6 +41,25 @@ expect(Hbc.appdir.join("Caffeine.app")).not_to exist end + it "calls `uninstall` before removing artifacts" do + cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-uninstall-script-app.rb") + + shutup do + Hbc::Installer.new(cask).install + end + + exp...
true
Other
Homebrew
brew
ecb17f4f1d265e1625828565ecbbdac6d5f989c6.json
Add test for `uninstall` before removing artifacts.
Library/Homebrew/test/support/fixtures/cask/Casks/with-uninstall-script-app.rb
@@ -0,0 +1,21 @@ +cask 'with-uninstall-script-app' do + version '1.2.3' + sha256 '5633c3a0f2e572cbf021507dec78c50998b398c343232bdfc7e26221d0a5db4d' + + url "file://#{TEST_FIXTURE_DIR}/cask/MyFancyApp.zip" + homepage 'http://example.com/MyFancyApp' + + app 'MyFancyApp/MyFancyApp.app' + + postflight do + IO.writ...
true
Other
Homebrew
brew
66735b91a316e2d56ad484699178496da5c83656.json
Convert Descriptions test to spec.
Library/Homebrew/test/descriptions_spec.rb
@@ -0,0 +1,42 @@ +require "descriptions" + +describe Descriptions do + subject { described_class.new(descriptions_hash) } + let(:descriptions_hash) { {} } + + it "can print description for a core Formula" do + descriptions_hash["homebrew/core/foo"] = "Core foo" + expect { subject.print }.to output("foo: Core f...
true
Other
Homebrew
brew
66735b91a316e2d56ad484699178496da5c83656.json
Convert Descriptions test to spec.
Library/Homebrew/test/descriptions_test.rb
@@ -1,48 +0,0 @@ -require "testing_env" -require "descriptions" - -class DescriptionsTest < Homebrew::TestCase - def setup - super - - @descriptions_hash = {} - @descriptions = Descriptions.new(@descriptions_hash) - - @old_stdout = $stdout - $stdout = StringIO.new - end - - def teardown - $stdout =...
true
Other
Homebrew
brew
f581ad7f0b73e0a8d38868d2d4fa85bb7fb0c486.json
Convert BuildEnvironment test to spec.
Library/Homebrew/test/build_environment_spec.rb
@@ -0,0 +1,66 @@ +require "build_environment" + +RSpec::Matchers.alias_matcher :use_userpaths, :be_userpaths + +describe BuildEnvironment do + let(:env) { described_class.new } + + describe "#<<" do + it "returns itself" do + expect(env << :foo).to be env + end + end + + describe "#merge" do + it "ret...
true
Other
Homebrew
brew
f581ad7f0b73e0a8d38868d2d4fa85bb7fb0c486.json
Convert BuildEnvironment test to spec.
Library/Homebrew/test/build_environment_test.rb
@@ -1,46 +0,0 @@ -require "testing_env" -require "build_environment" - -class BuildEnvironmentTests < Homebrew::TestCase - def setup - super - @env = BuildEnvironment.new - end - - def test_shovel_returns_self - assert_same @env, @env << :foo - end - - def test_merge_returns_self - assert_same @env, @e...
true
Other
Homebrew
brew
b89c0f16dd5e5d75e6e72187bf2956ce456c8090.json
Convert CxxStdlib test to spec.
Library/Homebrew/test/cxxstdlib_spec.rb
@@ -0,0 +1,68 @@ +require "formula" +require "cxxstdlib" + +describe CxxStdlib do + let(:clang) { CxxStdlib.create(:libstdcxx, :clang) } + let(:gcc) { CxxStdlib.create(:libstdcxx, :gcc) } + let(:gcc40) { CxxStdlib.create(:libstdcxx, :gcc_4_0) } + let(:gcc42) { CxxStdlib.create(:libstdcxx, :gcc_4_2) } + let(:gcc48)...
true
Other
Homebrew
brew
b89c0f16dd5e5d75e6e72187bf2956ce456c8090.json
Convert CxxStdlib test to spec.
Library/Homebrew/test/stdlib_test.rb
@@ -1,63 +0,0 @@ -require "testing_env" -require "formula" -require "cxxstdlib" - -class CxxStdlibTests < Homebrew::TestCase - def setup - super - @clang = CxxStdlib.create(:libstdcxx, :clang) - @gcc = CxxStdlib.create(:libstdcxx, :gcc) - @gcc40 = CxxStdlib.create(:libstdcxx, :gcc_4_0) - @gcc42 = CxxS...
true
Other
Homebrew
brew
279831fc0e3241eda17b6007aef02299b3c82c9e.json
Convert Exceptions test to spec.
Library/Homebrew/test/exceptions_spec.rb
@@ -0,0 +1,188 @@ +require "exceptions" + +describe MultipleVersionsInstalledError do + subject { described_class.new("foo") } + its(:to_s) { is_expected.to eq("foo has multiple installed versions") } +end + +describe NoSuchKegError do + subject { described_class.new("foo") } + its(:to_s) { is_expected.to eq("No su...
true
Other
Homebrew
brew
279831fc0e3241eda17b6007aef02299b3c82c9e.json
Convert Exceptions test to spec.
Library/Homebrew/test/exceptions_test.rb
@@ -1,147 +0,0 @@ -require "testing_env" -require "exceptions" - -class ExceptionsTest < Homebrew::TestCase - def test_multiple_versions_installed_error - assert_equal "foo has multiple installed versions", - MultipleVersionsInstalledError.new("foo").to_s - end - - def test_no_such_keg_error - assert_equa...
true
Other
Homebrew
brew
a3e0b188cf3bacdecff4bae188ea123af0848cef.json
Convert Patch test to spec.
Library/Homebrew/test/patch_spec.rb
@@ -0,0 +1,165 @@ +require "patch" + +describe Patch do + describe "#create" do + context "simple patch" do + subject { described_class.create(:p2, nil) } + it { is_expected.to be_kind_of ExternalPatch } + it { is_expected.to be_external } + its(:strip) { is_expected.to eq(:p2) } + end + + ...
true
Other
Homebrew
brew
a3e0b188cf3bacdecff4bae188ea123af0848cef.json
Convert Patch test to spec.
Library/Homebrew/test/patch_test.rb
@@ -1,155 +0,0 @@ -require "testing_env" -require "patch" - -class PatchTests < Homebrew::TestCase - def test_create_simple - patch = Patch.create(:p2, nil) - assert_kind_of ExternalPatch, patch - assert_predicate patch, :external? - assert_equal :p2, patch.strip - end - - def test_create_string - pat...
true
Other
Homebrew
brew
8d7d41dc852e9a6bd51aa36b4142a372681bae39.json
Convert Hardware test to spec.
Library/Homebrew/test/hardware_spec.rb
@@ -0,0 +1,40 @@ +require "hardware" + +module Hardware + describe CPU do + describe "::type" do + it "returns the current CPU's type as a symbol, or :dunno if it cannot be detected" do + expect( + [ + :intel, + :ppc, + :dunno, + ], + ).to includ...
true
Other
Homebrew
brew
8d7d41dc852e9a6bd51aa36b4142a372681bae39.json
Convert Hardware test to spec.
Library/Homebrew/test/hardware_test.rb
@@ -1,15 +0,0 @@ -require "testing_env" -require "hardware" - -class HardwareTests < Homebrew::TestCase - def test_hardware_cpu_type - assert_includes [:intel, :ppc, :dunno], Hardware::CPU.type - end - - if Hardware::CPU.intel? - def test_hardware_intel_family - families = [:core, :core2, :penryn, :nehale...
true
Other
Homebrew
brew
3bc0c6bd1a74fb5a77fdaca45543eca752eee64f.json
Convert Checksum test to spec.
Library/Homebrew/test/checksum_spec.rb
@@ -0,0 +1,19 @@ +require "checksum" + +describe Checksum do + describe "#empty?" do + subject { described_class.new(:sha256, "") } + it { is_expected.to be_empty } + end + + describe "#==" do + subject { described_class.new(:sha256, TEST_SHA256) } + let(:other) { described_class.new(:sha256, TEST_SHA256...
true
Other
Homebrew
brew
3bc0c6bd1a74fb5a77fdaca45543eca752eee64f.json
Convert Checksum test to spec.
Library/Homebrew/test/checksum_test.rb
@@ -1,22 +0,0 @@ -require "testing_env" -require "checksum" - -class ChecksumTests < Homebrew::TestCase - def test_empty? - assert_empty Checksum.new(:sha256, "") - end - - def test_equality - a = Checksum.new(:sha256, TEST_SHA256) - b = Checksum.new(:sha256, TEST_SHA256) - assert_equal a, b - - a = C...
true
Other
Homebrew
brew
2f919089ef381758f4db236dff4c4e6410259a7e.json
Remove JSON test.
Library/Homebrew/test/json_test.rb
@@ -1,20 +0,0 @@ -require "testing_env" -require "json" - -class JsonSmokeTest < Homebrew::TestCase - def test_encode - hash = { "foo" => ["bar", "baz"] } - json = '{"foo":["bar","baz"]}' - assert_equal json, JSON.generate(hash) - end - - def test_decode - hash = { "foo" => ["bar", "baz"], "qux" => 1 } -...
false
Other
Homebrew
brew
64448834a68ee1e183e5c2bf9504dadfa9431dc1.json
fix existing rule for github.io homepages
Library/Homebrew/dev-cmd/audit.rb
@@ -585,7 +585,7 @@ def audit_homepage # exemptions as they are discovered. Treat mixed content on homepages as a bug. # Justify each exemptions with a code comment so we can keep track here. case homepage - when %r{^http://[^/]*github\.io/}, + when %r{^http://[^/]*\.github\.io/}, %r{^htt...
false
Other
Homebrew
brew
a09169f248de707bf8121acfb6c5d5c2b92c58de.json
audit: enforce https for *.sourceforge.io urls
Library/Homebrew/dev-cmd/audit.rb
@@ -584,7 +584,9 @@ def audit_homepage # People will run into mixed content sometimes, but we should enforce and then add # exemptions as they are discovered. Treat mixed content on homepages as a bug. # Justify each exemptions with a code comment so we can keep track here. - if homepage =~ %r{^http:/...
false
Other
Homebrew
brew
f85d3d1f7ff891552c3bd54f8010cd9c401e8cd4.json
Convert Requirement test to spec.
Library/Homebrew/.rubocop.yml
@@ -12,7 +12,7 @@ AllCops: Style/BlockDelimiters: Exclude: - '**/cask/spec/**/*' - - '**/cask/test/**/*' + - '**/*_spec.rb' # so many of these in formulae but none in here Lint/AmbiguousRegexpLiteral:
true
Other
Homebrew
brew
f85d3d1f7ff891552c3bd54f8010cd9c401e8cd4.json
Convert Requirement test to spec.
Library/Homebrew/test/requirement_spec.rb
@@ -0,0 +1,288 @@ +require "extend/ENV" +require "requirement" + +RSpec::Matchers.alias_matcher :have_a_default_formula, :be_a_default_formula +RSpec::Matchers.alias_matcher :be_a_build_requirement, :be_a_build + +describe Requirement do + subject { klass.new } + + let(:klass) { Class.new(described_class) } + + desc...
true
Other
Homebrew
brew
f85d3d1f7ff891552c3bd54f8010cd9c401e8cd4.json
Convert Requirement test to spec.
Library/Homebrew/test/requirement_test.rb
@@ -1,152 +0,0 @@ -require "testing_env" -require "requirement" - -class RequirementTests < Homebrew::TestCase - class TestRequirement < Requirement; end - - def test_accepts_single_tag - dep = Requirement.new(%w[bar]) - assert_equal %w[bar], dep.tags - end - - def test_accepts_multiple_tags - dep = Requir...
true
Other
Homebrew
brew
6799081f8a156fbb07246cab936717fc00826857.json
Convert Emoji test to spec.
Library/Homebrew/test/emoji_spec.rb
@@ -0,0 +1,16 @@ +require "emoji" + +describe Emoji do + describe "#install_badge" do + subject { described_class.install_badge } + + it "returns 🍺 by default" do + expect(subject).to eq "🍺" + end + + it "returns the contents of HOMEBREW_INSTALL_BADGE if set" do + ENV["HOMEBREW_INSTALL_BADGE"] ...
true
Other
Homebrew
brew
6799081f8a156fbb07246cab936717fc00826857.json
Convert Emoji test to spec.
Library/Homebrew/test/emoji_test.rb
@@ -1,11 +0,0 @@ -require "testing_env" -require "emoji" - -class EmojiTest < Homebrew::TestCase - def test_install_badge - assert_equal "🍺", Emoji.install_badge - - ENV["HOMEBREW_INSTALL_BADGE"] = "foo" - assert_equal "foo", Emoji.install_badge - end -end
true
Other
Homebrew
brew
23767a378bf4c10d2e78e49050ab566d9f8cdaed.json
Convert X11Requirement test to spec.
Library/Homebrew/test/x11_requirement_spec.rb
@@ -0,0 +1,36 @@ +require "requirements/x11_requirement" + +describe X11Requirement do + let(:default_name) { "x11" } + + describe "#name" do + it "defaults to x11" do + expect(subject.name).to eq(default_name) + end + end + + describe "#eql?" do + it "returns true if the names are equal" do + ot...
true
Other
Homebrew
brew
23767a378bf4c10d2e78e49050ab566d9f8cdaed.json
Convert X11Requirement test to spec.
Library/Homebrew/test/x11_requirement_test.rb
@@ -1,31 +0,0 @@ -require "testing_env" -require "requirements/x11_requirement" - -class X11RequirementTests < Homebrew::TestCase - def test_eql_instances_are_eql - x = X11Requirement.new - y = X11Requirement.new - assert_eql x, y - assert_equal x.hash, y.hash - end - - def test_not_eql_when_hashes_diffe...
true
Other
Homebrew
brew
e07a587f42abcf107866f0937643b1a261adf185.json
--prefix: use opt_prefix when available. Fixes #1952.
Library/Homebrew/cmd/--prefix.rb
@@ -11,7 +11,9 @@ def __prefix if ARGV.named.empty? puts HOMEBREW_PREFIX else - puts ARGV.resolved_formulae.map(&:installed_prefix) + puts ARGV.resolved_formulae.map { |f| + f.opt_prefix.exist? ? f.opt_prefix : f.installed_prefix + } end end end
false
Other
Homebrew
brew
efc1f1c7da50e77e96a4324c9380e19848dcf03d.json
formula_installer: add env to allow unlinked deps. We can enable this locally and/or in `brew test-bot` to see if this code is needed any more. If we can remove it we can start doing much more interesting things with linking keg-only, versioned formulae and system dupe formulae.
Library/Homebrew/formula_installer.rb
@@ -171,12 +171,14 @@ def check_install_sanity end end - unlinked_deps = recursive_formulae.select do |dep| - dep.installed? && !dep.keg_only? && !dep.linked_keg.directory? - end + unless ENV["HOMEBREW_NO_CHECK_UNLINKED_DEPENDENCIES"] + unlinked_deps = recursive_formulae.select do |dep|...
false
Other
Homebrew
brew
93441743794a3d44f90bc53438ca31add960f757.json
Use HTTPS for the homepage.
Library/Homebrew/global.rb
@@ -15,7 +15,7 @@ HOMEBREW_PRODUCT = ENV["HOMEBREW_PRODUCT"] HOMEBREW_VERSION = ENV["HOMEBREW_VERSION"] -HOMEBREW_WWW = "http://brew.sh".freeze +HOMEBREW_WWW = "https://brew.sh".freeze require "config"
true
Other
Homebrew
brew
93441743794a3d44f90bc53438ca31add960f757.json
Use HTTPS for the homepage.
README.md
@@ -1,5 +1,5 @@ # Homebrew -Features, usage and installation instructions are [summarised on the homepage](http://brew.sh). Terminology (e.g. the difference between a Cellar, Tap, Cask and so forth) is [explained here](docs/Formula-Cookbook.md#homebrew-terminology). +Features, usage and installation instructions are [...
true
Other
Homebrew
brew
93441743794a3d44f90bc53438ca31add960f757.json
Use HTTPS for the homepage.
docs/Installation.md
@@ -1,7 +1,7 @@ # Installation The suggested and easiest way to install Homebrew is on the -[homepage](http://brew.sh). +[homepage](https://brew.sh). The standard script installs Homebrew to `/usr/local` so that [you don’t need sudo](FAQ.md) when you @@ -55,5 +55,5 @@ Apple Developer account on older versions o...
true
Other
Homebrew
brew
fd343a11fbde41420fe13b4acab7bce8eea34d13.json
gcc_version_formula: Use gcc@4.x rather than gcc4x
Library/Homebrew/extend/ENV/shared.rb
@@ -269,7 +269,7 @@ def ld64 # @private def gcc_version_formula(name) version = name[GNU_GCC_REGEXP, 1] - gcc_version_name = "gcc#{version.delete(".")}" + gcc_version_name = "gcc@#{version}" gcc = Formulary.factory("gcc") if gcc.version_suffix == version @@ -286,7 +286,6 @@ def warn_about_n...
false
Other
Homebrew
brew
ae829ed229395159adf6f1f17fb26518ec27fca6.json
add brew where command
Library/Homebrew/cmd/help.rb
@@ -15,7 +15,7 @@ Developers: brew create [URL [--no-fetch]] - brew edit [FORMULA...] + brew (where|edit) [FORMULA...] http://docs.brew.sh/Formula-Cookbook.html Further help:
true
Other
Homebrew
brew
ae829ed229395159adf6f1f17fb26518ec27fca6.json
add brew where command
Library/Homebrew/dev-cmd/where.rb
@@ -0,0 +1,15 @@ +#: * `where` <formulae>: +#: echo location of the specified <formulae> to stdout + +require "formula" + +module Homebrew + module_function + + def where + raise FormulaUnspecifiedError if ARGV.named.empty? + ARGV.resolved_formulae.each do |f| + puts "#{f.path}\n" + end + end +end
true
Other
Homebrew
brew
ae829ed229395159adf6f1f17fb26518ec27fca6.json
add brew where command
completions/zsh/_brew
@@ -120,6 +120,7 @@ __brew_common_commands() { 'update:fetch latest version of Homebrew and all formulae' 'upgrade:upgrade outdated formulae' 'uses:show formulae which depend on a formula' + 'where:location of formulae' '--cellar:brew cellar' '--env:brew environment' '--repository:brew ...
true
Other
Homebrew
brew
ae829ed229395159adf6f1f17fb26518ec27fca6.json
add brew where command
docs/brew.1.html
@@ -625,6 +625,7 @@ <h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2> <p>If <code>--keep-tmp</code> is passed, retain the temporary directory containing the new repository clone.</p></dd> +<dt><code>where</code> <var>formulae</var></dt><dd><p>echo location of the specified <var>formulae</var> to stdout</p></dd> ...
true
Other
Homebrew
brew
ae829ed229395159adf6f1f17fb26518ec27fca6.json
add brew where command
manpages/brew.1
@@ -823,6 +823,10 @@ If \fB\-\-to\-tag\fR is passed, set HOMEBREW_UPDATE_TO_TAG to test updating betw .IP If \fB\-\-keep\-tmp\fR is passed, retain the temporary directory containing the new repository clone\. . +.TP +\fBwhere\fR \fIformulae\fR +echo location of the specified \fIformulae\fR to stdout +. .SH "OFFICIA...
true
Other
Homebrew
brew
7be5a6a3d2cdb68870a37bdaa2d0c5cdec20c70b.json
Convert Blacklist test to spec.
Library/Homebrew/test/blacklist_spec.rb
@@ -0,0 +1,111 @@ +require "blacklist" + +RSpec::Matchers.define :be_blacklisted do + match do |actual| + blacklisted?(actual) + end +end + +describe "Blacklist" do + context "rubygems" do + %w[gem rubygem rubygems].each do |s| + subject { s } + + it { is_expected.to be_blacklisted } + end + end ...
true
Other
Homebrew
brew
7be5a6a3d2cdb68870a37bdaa2d0c5cdec20c70b.json
Convert Blacklist test to spec.
Library/Homebrew/test/blacklist_test.rb
@@ -1,68 +0,0 @@ -require "testing_env" -require "blacklist" - -class BlacklistTests < Homebrew::TestCase - def assert_blacklisted(s) - assert blacklisted?(s), "'#{s}' should be blacklisted" - end - - def test_rubygems - %w[gem rubygem rubygems].each { |s| assert_blacklisted s } - end - - def test_latex - ...
true
Other
Homebrew
brew
f531e63949683a7bf33ec96014901e3c6d5eaf61.json
Convert Bash test to spec.
Library/Homebrew/test/bash_spec.rb
@@ -0,0 +1,52 @@ +require "open3" + +RSpec::Matchers.define :have_valid_bash_syntax do + match do |file| + stdout, stderr, status = Open3.capture3("/bin/bash", "-n", file) + + @actual = [file, stderr] + + stdout.empty? && status.success? + end + + failure_message do |(file, stderr)| + "expected that #{fi...
true
Other
Homebrew
brew
f531e63949683a7bf33ec96014901e3c6d5eaf61.json
Convert Bash test to spec.
Library/Homebrew/test/bash_test.rb
@@ -1,35 +0,0 @@ -require "testing_env" - -class BashTests < Homebrew::TestCase - def assert_valid_bash_syntax(file) - return unless file.exist? - output = Utils.popen_read("/bin/bash -n #{file} 2>&1") - assert $?.success?, output - end - - def test_bin_brew - assert_valid_bash_syntax HOMEBREW_LIBRARY_PA...
true
Other
Homebrew
brew
46a1e2f22d866275da68d11b871883f34669705f.json
Convert `ARGV` test to spec.
Library/Homebrew/test/ARGV_spec.rb
@@ -0,0 +1,149 @@ +require "extend/ARGV" + +describe HomebrewArgvExtension do + subject { argv.extend(HomebrewArgvExtension) } + let(:argv) { ["mxcl"] } + + describe "#formulae" do + it "raises an error when a Formula is unavailable" do + expect { subject.formulae }.to raise_error FormulaUnavailableError + ...
true
Other
Homebrew
brew
46a1e2f22d866275da68d11b871883f34669705f.json
Convert `ARGV` test to spec.
Library/Homebrew/test/ARGV_test.rb
@@ -1,79 +0,0 @@ -require "testing_env" -require "extend/ARGV" - -class ArgvExtensionTests < Homebrew::TestCase - def setup - super - @argv = [].extend(HomebrewArgvExtension) - end - - def test_argv_formulae - @argv.unshift "mxcl" - assert_raises(FormulaUnavailableError) { @argv.formulae } - end - - de...
true
Other
Homebrew
brew
ab785ca4146eb027e639a43f4efd8925886dfc85.json
Add RSpec to Gemfile.
Library/Homebrew/test/Gemfile
@@ -4,6 +4,9 @@ gem "mocha" gem "minitest" gem "minitest-reporters" gem "parallel_tests" +gem "rspec" +gem "rspec-its", require: false +gem "rspec-wait", require: false group :coverage do gem "simplecov", require: false
true
Other
Homebrew
brew
ab785ca4146eb027e639a43f4efd8925886dfc85.json
Add RSpec to Gemfile.
Library/Homebrew/test/Gemfile.lock
@@ -7,6 +7,7 @@ GEM json simplecov url + diff-lcs (1.3) docile (1.1.5) json (2.0.3) metaclass (0.0.4) @@ -21,6 +22,24 @@ GEM parallel (1.10.0) parallel_tests (2.13.0) parallel + rspec (3.5.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + ...
true
Other
Homebrew
brew
f457c6ab327b0520c61021437b87be0cedc5f770.json
diagnostic: Add CircleCI to Env check
Library/Homebrew/extend/os/mac/diagnostic.rb
@@ -53,8 +53,8 @@ def check_xcode_up_to_date return unless MacOS::Xcode.installed? return unless MacOS::Xcode.outdated? - # Travis CI images are going to end up outdated so don't complain. - return if ENV["TRAVIS"] + # CI images are going to end up outdated so don't complain. + ...
false
Other
Homebrew
brew
b9de5c04908bbbe2e2c30fff57b1301e17082202.json
Simplify spec helper.
Library/Homebrew/cask/spec/spec_helper.rb
@@ -34,16 +34,26 @@ # pretend that the caskroom/cask Tap is installed FileUtils.ln_s Pathname.new(ENV["HOMEBREW_LIBRARY"]).join("Taps", "caskroom", "homebrew-cask"), Tap.fetch("caskroom", "cask").path +HOMEBREW_CASK_DIRS = [ + :appdir, + :caskroom, + :prefpanedir, + :qlplugindir, + :servicedir, + :binarydir, ...
false
Other
Homebrew
brew
a9e538efbdb0532e9236400434c9970e0cdfd8fc.json
Move NeverSudoSystemCommand to separate file.
Library/Homebrew/cask/spec/spec_helper.rb
@@ -66,11 +66,3 @@ end end end - -module Hbc - class NeverSudoSystemCommand < SystemCommand - def self.run(command, options = {}) - super(command, options.merge(sudo: false)) - end - end -end
true
Other
Homebrew
brew
a9e538efbdb0532e9236400434c9970e0cdfd8fc.json
Move NeverSudoSystemCommand to separate file.
Library/Homebrew/cask/spec/support/never_sudo_system_command.rb
@@ -1,3 +1,5 @@ +require "hbc/system_command" + module Hbc class NeverSudoSystemCommand < SystemCommand def self.run(command, options = {})
true
Other
Homebrew
brew
a616fab5bf84d9e2a07610666cf148444c04b3c4.json
Convert cask test to spec.
Library/Homebrew/cask/spec/cask/cask_spec.rb
@@ -20,4 +20,73 @@ end end end + + describe "load" do + let(:hbc_relative_tap_path) { "../../Taps/caskroom/homebrew-cask" } + + it "returns an instance of the Cask for the given token" do + c = Hbc.load("adium") + expect(c).to be_kind_of(Hbc::Cask) + expect(c.token).to eq("adium") +...
true
Other
Homebrew
brew
a616fab5bf84d9e2a07610666cf148444c04b3c4.json
Convert cask test to spec.
Library/Homebrew/cask/test/cask_test.rb
@@ -1,71 +0,0 @@ -require "test_helper" - -describe "Cask" do - hbc_relative_tap_path = "../../Taps/caskroom/homebrew-cask" - describe "load" do - it "returns an instance of the Cask for the given token" do - c = Hbc.load("adium") - c.must_be_kind_of(Hbc::Cask) - c.token.must_equal("adium") - end...
true
Other
Homebrew
brew
6154182b13642de41125403d3be9959814d0afc3.json
Remove syntax test.
Library/Homebrew/cask/test/syntax_test.rb
@@ -1,17 +0,0 @@ -require "test_helper" - -describe "Syntax check" do - project_root = Pathname.new(File.expand_path("#{File.dirname(__FILE__)}/../")) - backend_files = Dir[project_root.join("**", "*.rb")].reject { |f| f.match %r{/vendor/|/Casks/} } - interpreter = RUBY_PATH - flags = %w[-c] - flags.unshift "--dis...
false
Other
Homebrew
brew
0a4bc0e3b4526dacf2045b12741c1359b43607bc.json
Convert uninstall_postflight test to spec.
Library/Homebrew/cask/spec/cask/dsl/uninstall_postflight_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::DSL::UninstallPostflight do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
false
Other
Homebrew
brew
451e7c3aebf77be1d353712d202e2e915b8962f0.json
Convert preflight test to spec.
Library/Homebrew/cask/spec/cask/dsl/preflight_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::DSL::Preflight do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
false
Other
Homebrew
brew
e7c943b561cc9c0bfc1d0923783e5dbf729bc076.json
Convert postflight test to spec.
Library/Homebrew/cask/spec/cask/dsl/postflight_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::DSL::Postflight do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
true
Other
Homebrew
brew
e7c943b561cc9c0bfc1d0923783e5dbf729bc076.json
Convert postflight test to spec.
Library/Homebrew/cask/spec/support/shared_examples/staged.rb
@@ -1,109 +1,143 @@ -require "test_helper" +require "spec_helper" -shared_examples_for Hbc::Staged do +require "hbc/staged" + +shared_examples Hbc::Staged do let(:fake_pathname_exists) { - fake_pathname = Pathname("/path/to/file/that/exists") - fake_pathname.stubs(exist?: true, expand_path: fake_pathname) + ...
true
Other
Homebrew
brew
e7c943b561cc9c0bfc1d0923783e5dbf729bc076.json
Convert postflight test to spec.
Library/Homebrew/cask/test/test_helper.rb
@@ -93,7 +93,6 @@ def self.install_without_artifacts_with_caskfile(cask) # Extend MiniTest API with support for RSpec-style shared examples require "support/shared_examples" -require "support/shared_examples/staged.rb" require "support/fake_dirs" require "support/fake_system_command"
true
Other
Homebrew
brew
ba61d3ca6ba6ee4d8553d7f3df1b0de88806a6fe.json
Convert caveats test to spec.
Library/Homebrew/cask/spec/cask/dsl/caveats_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::DSL::Caveats do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/basic-cask.rb") }
true
Other
Homebrew
brew
ba61d3ca6ba6ee4d8553d7f3df1b0de88806a6fe.json
Convert caveats test to spec.
Library/Homebrew/cask/spec/spec_helper.rb
@@ -17,7 +17,7 @@ require "test/support/helper/shutup" -Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "*.rb")).each(&method(:require)) +Pathname.glob(HOMEBREW_LIBRARY_PATH.join("cask", "spec", "support", "**", "*.rb")).each(&method(:require)) require "hbc"
true
Other
Homebrew
brew
ba61d3ca6ba6ee4d8553d7f3df1b0de88806a6fe.json
Convert caveats test to spec.
Library/Homebrew/cask/spec/support/shared_examples/dsl_base.rb
@@ -0,0 +1,23 @@ +require "hbc/dsl/base" + +shared_examples Hbc::DSL::Base do + it "supports the token method" do + expect(dsl.token).to eq(cask.token) + end + + it "supports the version method" do + expect(dsl.version).to eq(cask.version) + end + + it "supports the caskroom_path method" do + expect(dsl.c...
true
Other
Homebrew
brew
ba61d3ca6ba6ee4d8553d7f3df1b0de88806a6fe.json
Convert caveats test to spec.
Library/Homebrew/cask/test/support/shared_examples/dsl_base.rb
@@ -1,23 +0,0 @@ -require "test_helper" - -shared_examples_for Hbc::DSL::Base do - it "supports the token method" do - dsl.token.must_equal cask.token - end - - it "supports the version method" do - dsl.version.must_equal cask.version - end - - it "supports the caskroom_path method" do - dsl.caskroom_path...
true
Other
Homebrew
brew
ba61d3ca6ba6ee4d8553d7f3df1b0de88806a6fe.json
Convert caveats test to spec.
Library/Homebrew/cask/test/test_helper.rb
@@ -93,7 +93,6 @@ def self.install_without_artifacts_with_caskfile(cask) # Extend MiniTest API with support for RSpec-style shared examples require "support/shared_examples" -require "support/shared_examples/dsl_base.rb" require "support/shared_examples/staged.rb" require "support/fake_dirs"
true
Other
Homebrew
brew
59668d27108c34499ae8d00dd9354dc57a112de0.json
Convert naked test to spec.
Library/Homebrew/cask/spec/cask/container/naked_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::Container::Naked do it "saves files with spaces in them from uris with encoded spaces" do @@ -13,8 +13,13 @@ Hbc::FakeSystemCommand.stubs_command(expected_command) container = Hbc::Container::Naked.new(cask, path, Hbc::FakeSys...
false
Other
Homebrew
brew
92e2e7a21665aad705d76b90735aed854b7a09f5.json
Convert DMG test to spec.
Library/Homebrew/cask/spec/cask/container/dmg_spec.rb
@@ -1,7 +1,7 @@ -require "test_helper" +require "spec_helper" describe Hbc::Container::Dmg do - describe "mount!" do + describe "#mount!" do it "does not store nil mounts for dmgs with extra data" do transmission = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-transmission.rb") @@...
false
Other
Homebrew
brew
4de74bf744ff3006da32bf592735718fec9798d6.json
Convert uninstall test to spec.
Library/Homebrew/cask/spec/cask/artifact/uninstall_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::Artifact::Uninstall do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-installable.rb") } @@ -7,9 +7,9 @@ Hbc::Artifact::Uninstall.new(cask, command: Hbc::FakeSystemCommand) } - before do + before...
false
Other
Homebrew
brew
c431758f2dff931b69b16ab412dabacbe77380c0.json
Convert Zap test to spec.
Library/Homebrew/cask/spec/cask/artifact/zap_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" # TODO: test that zap removes an alternate version of the same Cask describe Hbc::Artifact::Zap do @@ -8,9 +8,9 @@ Hbc::Artifact::Zap.new(cask, command: Hbc::FakeSystemCommand) } - before do + before(:each) do shutup do - TestHelper...
true
Other
Homebrew
brew
c431758f2dff931b69b16ab412dabacbe77380c0.json
Convert Zap test to spec.
Library/Homebrew/cask/spec/support/fake_system_command.rb
@@ -0,0 +1,77 @@ +def sudo(*args) + %w[/usr/bin/sudo -E --] + args.flatten +end + +module Hbc + class FakeSystemCommand + def self.responses + @responses ||= {} + end + + def self.expectations + @expectations ||= {} + end + + def self.system_calls + @system_calls ||= Hash.new(0) + end...
true
Other
Homebrew
brew
3db8cdf8613694a26051e0ee291f931a7ca00ae3.json
Convert NestedContainer test to spec.
Library/Homebrew/cask/spec/cask/artifact/nested_container_spec.rb
@@ -1,17 +1,17 @@ -require "test_helper" +require "spec_helper" describe Hbc::Artifact::NestedContainer do describe "install" do it "extracts the specified paths as containers" do cask = Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/nested-app.rb").tap do |c| - TestHelper.install_...
false
Other
Homebrew
brew
24d50599410dacbb36decfc957a5933e19d6a205.json
Convert generic artifact test to spec.
Library/Homebrew/cask/spec/cask/artifact/generic_artifact_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::Artifact::Artifact do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/with-generic-artifact.rb") } @@ -11,14 +11,14 @@ let(:target_path) { Hbc.appdir.join("Caffeine.app") } before do - TestHelper.instal...
false
Other
Homebrew
brew
20e85cc96feaa4cb4a9ddac64758297aa2bff728.json
Convert App test to spec.
Library/Homebrew/cask/spec/cask/artifact/app_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::Artifact::App do let(:cask) { Hbc::CaskLoader.load_from_file(TEST_FIXTURE_DIR/"cask/Casks/local-caffeine.rb") } @@ -12,8 +12,8 @@ let(:install_phase) { -> { app.install_phase } } let(:uninstall_phase) { -> { app.uninstall_phase } } ...
false
Other
Homebrew
brew
75609f7212c9e992eec22554abb3fb5540e62d96.json
Convert alt target test to spec.
Library/Homebrew/cask/spec/cask/artifact/alt_target_spec.rb
@@ -1,4 +1,4 @@ -require "test_helper" +require "spec_helper" describe Hbc::Artifact::App do describe "activate to alternate target" do @@ -12,19 +12,19 @@ let(:target_path) { Hbc.appdir.join("AnotherName.app") } before do - TestHelper.install_without_artifacts(cask) + InstallHelper.install_...
false
Other
Homebrew
brew
787860c1bd228c849ab311e57a5042c1cb5162e2.json
Convert Zap test to spec.
Library/Homebrew/cask/spec/cask/cli/zap_spec.rb
@@ -1,10 +1,10 @@ -require "test_helper" +require "spec_helper" describe Hbc::CLI::Zap do it "shows an error when a bad Cask is provided" do - lambda { + expect { Hbc::CLI::Zap.run("notacask") - }.must_raise Hbc::CaskUnavailableError + }.to raise_error(Hbc::CaskUnavailableError) end it ...
false
Other
Homebrew
brew
32565eb96efcda28f4c255afc4e25467b8560379.json
Convert Version test to spec.
Library/Homebrew/cask/spec/cask/cli/version_spec.rb
@@ -0,0 +1,11 @@ +require "spec_helper" + +describe "brew cask --version" do + it "respects the --version argument" do + expect { + expect { + Hbc::CLI::NullCommand.new("--version").run + }.not_to output.to_stderr + }.to output(Hbc.full_version).to_stdout + end +end
true
Other
Homebrew
brew
32565eb96efcda28f4c255afc4e25467b8560379.json
Convert Version test to spec.
Library/Homebrew/cask/test/cask/cli/version_test.rb
@@ -1,9 +0,0 @@ -require "test_helper" - -describe "brew cask --version" do - it "respects the --version argument" do - lambda { - Hbc::CLI::NullCommand.new("--version").run - }.must_output Hbc.full_version - end -end
true
Other
Homebrew
brew
3d031420404506223d047fc509e53df4cc9185d9.json
Convert Uninstall test to spec.
Library/Homebrew/cask/spec/cask/cli/uninstall_spec.rb
@@ -1,22 +1,22 @@ -require "test_helper" +require "spec_helper" describe Hbc::CLI::Uninstall do it "shows an error when a bad Cask is provided" do - lambda { + expect { Hbc::CLI::Uninstall.run("notacask") - }.must_raise Hbc::CaskUnavailableError + }.to raise_error(Hbc::CaskUnavailableError) ...
false
Other
Homebrew
brew
82e6070ca045001eab7aec0ba9b85dbca48615f8.json
Convert Search test to spec.
Library/Homebrew/cask/spec/cask/cli/search_spec.rb
@@ -0,0 +1,61 @@ +require "spec_helper" + +describe Hbc::CLI::Search do + it "lists the available Casks that match the search term" do + expect { + Hbc::CLI::Search.run("photoshop") + }.to output(<<-EOS.undent).to_stdout + ==> Partial matches + adobe-photoshop-cc + adobe-photoshop-lightroom +...
true