tests: fix patching test for no-compat mode

Closes Homebrew/homebrew#41977.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-07-21 22:14:04 +08:00
parent 60600c824c
commit 33befcf312
2 changed files with 2 additions and 2 deletions

View File

@ -941,7 +941,7 @@ class Formula
end
def prepare_patches
active_spec.add_legacy_patches(patches)
active_spec.add_legacy_patches(patches) if respond_to?(:patches)
patchlist.grep(DATAPatch) { |p| p.path = path }

View File

@ -106,7 +106,7 @@ class PatchingTests < Homebrew::TestCase
def test_patch_DATA_constant
assert_patched formula("test", Pathname.new(__FILE__).expand_path) {
def patches
Formula::DATA
:DATA
end
}
end