diff options
| author | Xu Cheng | 2016-03-07 18:04:25 +0800 |
|---|---|---|
| committer | Xu Cheng | 2016-03-07 19:43:46 +0800 |
| commit | 28f3dae8cd5bf975121090cb58262b8344a3917c (patch) | |
| tree | 3b2b793a3c715b401d5ef9288d5c108f334e4aa2 /Library/Homebrew/test | |
| parent | 2b32cfe7b0b0171da97a96d6e1f9ed3ec92e7f6c (diff) | |
| download | brew-28f3dae8cd5bf975121090cb58262b8344a3917c.tar.bz2 | |
rename CoreFormulaRepository to CoreTap
Core tap will be separated from core code in the near future.
It makes sense to rename it to CoreTap.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_formulary.rb | 6 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_integration_cmds.rb | 41 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_tap.rb | 10 | ||||
| -rw-r--r-- | Library/Homebrew/test/test_update_report.rb | 2 |
4 files changed, 29 insertions, 30 deletions
diff --git a/Library/Homebrew/test/test_formulary.rb b/Library/Homebrew/test/test_formulary.rb index f41bcde3a..48f155fcb 100644 --- a/Library/Homebrew/test/test_formulary.rb +++ b/Library/Homebrew/test/test_formulary.rb @@ -16,7 +16,7 @@ end class FormularyFactoryTest < Homebrew::TestCase def setup @name = "testball_bottle" - @path = CoreFormulaRepository.new.formula_dir/"#{@name}.rb" + @path = CoreTap.new.formula_dir/"#{@name}.rb" @bottle_dir = Pathname.new("#{File.expand_path("..", __FILE__)}/bottles") @bottle = @bottle_dir/"testball_bottle-0.1.#{bottle_tag}.bottle.tar.gz" @path.write <<-EOS.undent @@ -72,7 +72,7 @@ class FormularyFactoryTest < Homebrew::TestCase end def test_factory_from_alias - alias_dir = CoreFormulaRepository.instance.alias_dir + alias_dir = CoreTap.instance.alias_dir alias_dir.mkpath FileUtils.ln_s @path, alias_dir/"foo" assert_kind_of Formula, Formulary.factory("foo") @@ -144,7 +144,7 @@ end class FormularyTapPriorityTest < Homebrew::TestCase def setup @name = "foo" - @core_path = CoreFormulaRepository.new.formula_dir/"#{@name}.rb" + @core_path = CoreTap.new.formula_dir/"#{@name}.rb" @tap = Tap.new "homebrew", "foo" @tap_path = @tap.path/"#{@name}.rb" code = <<-EOS.undent diff --git a/Library/Homebrew/test/test_integration_cmds.rb b/Library/Homebrew/test/test_integration_cmds.rb index 530c9aa13..52606da08 100644 --- a/Library/Homebrew/test/test_integration_cmds.rb +++ b/Library/Homebrew/test/test_integration_cmds.rb @@ -1,6 +1,5 @@ require "bundler" require "testing_env" -require "core_formula_repository" require "fileutils" require "pathname" @@ -146,7 +145,7 @@ class IntegrationCommandTests < Homebrew::TestCase cmd("install", "--build-bottle", testball) assert_match "Formula not from core or any taps", cmd_fail("bottle", "--no-revision", testball) - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -181,7 +180,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_readall - repo = CoreFormulaRepository.new + repo = CoreTap.new formula_file = repo.formula_dir/"foo.rb" formula_file.write <<-EOS.undent class Foo < Formula @@ -228,7 +227,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_missing - repo = CoreFormulaRepository.new + repo = CoreTap.new foo_file = repo.formula_dir/"foo.rb" foo_file.write <<-EOS.undent class Foo < Formula @@ -271,7 +270,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_cat - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" content = <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -285,7 +284,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_desc - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula desc "Some test" @@ -300,7 +299,7 @@ class IntegrationCommandTests < Homebrew::TestCase def test_edit (HOMEBREW_REPOSITORY/".git").mkpath - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -321,7 +320,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_info - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -345,7 +344,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_unpack - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -363,7 +362,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_options - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -379,7 +378,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_outdated - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -394,7 +393,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_upgrade - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -422,7 +421,7 @@ class IntegrationCommandTests < Homebrew::TestCase apps_dir = Pathname.new(home).join("Applications") apps_dir.mkpath - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -444,7 +443,7 @@ class IntegrationCommandTests < Homebrew::TestCase apps_dir = Pathname.new(home).join("Applications") apps_dir.mkpath - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "https://example.com/testball-0.1.tar.gz" @@ -465,7 +464,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_pin_unpin - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -494,7 +493,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_reinstall - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -545,7 +544,7 @@ class IntegrationCommandTests < Homebrew::TestCase url = "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" cmd("create", url, {"HOMEBREW_EDITOR" => "/bin/cat"}) - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" assert formula_file.exist?, "The formula source should have been created" assert_match %(sha256 "#{TESTBALL_SHA256}"), formula_file.read ensure @@ -554,7 +553,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_fetch - formula_file = CoreFormulaRepository.new.formula_dir/"testball.rb" + formula_file = CoreTap.new.formula_dir/"testball.rb" formula_file.write <<-EOS.undent class Testball < Formula url "file://#{File.expand_path("..", __FILE__)}/tarballs/testball-0.1.tbz" @@ -571,7 +570,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_deps - formula_dir = CoreFormulaRepository.new.formula_dir + formula_dir = CoreTap.new.formula_dir formula_file1 = formula_dir/"testball1.rb" formula_file2 = formula_dir/"testball2.rb" formula_file3 = formula_dir/"testball3.rb" @@ -604,7 +603,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_uses - formula_dir = CoreFormulaRepository.new.formula_dir + formula_dir = CoreTap.new.formula_dir formula_file1 = formula_dir/"testball1.rb" formula_file2 = formula_dir/"testball2.rb" formula_file3 = formula_dir/"testball3.rb" @@ -648,7 +647,7 @@ class IntegrationCommandTests < Homebrew::TestCase end def test_leaves - formula_dir = CoreFormulaRepository.new.formula_dir + formula_dir = CoreTap.new.formula_dir formula_file1 = formula_dir/"testball1.rb" formula_file2 = formula_dir/"testball2.rb" formula_file1.write <<-EOS.undent diff --git a/Library/Homebrew/test/test_tap.rb b/Library/Homebrew/test/test_tap.rb index 6438e0808..56c87de83 100644 --- a/Library/Homebrew/test/test_tap.rb +++ b/Library/Homebrew/test/test_tap.rb @@ -59,7 +59,7 @@ class TapTest < Homebrew::TestCase end def test_fetch - assert_kind_of CoreFormulaRepository, Tap.fetch("Homebrew", "homebrew") + assert_kind_of CoreTap, Tap.fetch("Homebrew", "homebrew") tap = Tap.fetch("Homebrew", "foo") assert_kind_of Tap, tap assert_equal "homebrew/foo", tap.name @@ -78,7 +78,7 @@ class TapTest < Homebrew::TestCase assert_equal @path, @tap.path assert_predicate @tap, :installed? assert_predicate @tap, :official? - refute_predicate @tap, :core_formula_repository? + refute_predicate @tap, :core_tap? end def test_issues_url @@ -204,11 +204,11 @@ class TapTest < Homebrew::TestCase end end -class CoreFormulaRepositoryTest < Homebrew::TestCase +class CoreTapTest < Homebrew::TestCase include FileUtils def setup - @repo = CoreFormulaRepository.new + @repo = CoreTap.new end def test_attributes @@ -219,7 +219,7 @@ class CoreFormulaRepositoryTest < Homebrew::TestCase assert_predicate @repo, :installed? refute_predicate @repo, :pinned? assert_predicate @repo, :official? - assert_predicate @repo, :core_formula_repository? + assert_predicate @repo, :core_tap? end def test_forbidden_operations diff --git a/Library/Homebrew/test/test_update_report.rb b/Library/Homebrew/test/test_update_report.rb index 1c96ba105..cf6804b10 100644 --- a/Library/Homebrew/test/test_update_report.rb +++ b/Library/Homebrew/test/test_update_report.rb @@ -24,7 +24,7 @@ class ReportTests < Homebrew::TestCase end def setup - @tap = CoreFormulaRepository.new + @tap = CoreTap.new @reporter = ReporterMock.new(@tap, "12345678", "abcdef12") @hub = ReporterHub.new end |
