aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorXu Cheng2016-02-25 14:14:33 +0800
committerXu Cheng2016-02-25 17:22:28 +0800
commit87ecd621ebd3f3bfc170fc6e09eba84301b80027 (patch)
tree937f65705f90fff9969e994520ecf10ebf5cb1a8 /Library/Homebrew/test
parenta7869783ada72693b4c1cd1b3247e268a35f7348 (diff)
downloadbrew-87ecd621ebd3f3bfc170fc6e09eba84301b80027.tar.bz2
add Tap#tap_migrations
This enables tap migration feature in per tap case, which will ultimately help core/formula separation.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_tap.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_tap.rb b/Library/Homebrew/test/test_tap.rb
index 1159eb992..278132bad 100644
--- a/Library/Homebrew/test/test_tap.rb
+++ b/Library/Homebrew/test/test_tap.rb
@@ -20,6 +20,9 @@ class TapTest < Homebrew::TestCase
(@path/"formula_renames.json").write <<-EOS.undent
{ "oldname": "foo" }
EOS
+ (@path/"tap_migrations.json").write <<-EOS.undent
+ { "removed-formula": "homebrew/foo" }
+ EOS
@cmd_file = @path/"cmd/brew-tap-cmd.rb"
@cmd_file.parent.mkpath
FileUtils.touch @cmd_file
@@ -93,6 +96,7 @@ class TapTest < Homebrew::TestCase
assert_equal @tap.alias_table, "homebrew/foo/bar" => "homebrew/foo/foo"
assert_equal @tap.alias_reverse_table, "homebrew/foo/foo" => ["homebrew/foo/bar"]
assert_equal @tap.formula_renames, "oldname" => "foo"
+ assert_equal @tap.tap_migrations, "removed-formula" => "homebrew/foo"
assert_equal [@cmd_file], @tap.command_files
assert_kind_of Hash, @tap.to_hash
assert_equal true, @tap.formula_file?(@formula_file)