diff options
| author | Mike McQuaid | 2016-07-31 19:12:04 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2016-07-31 19:22:12 +0100 |
| commit | 7a00f03c92607f65336be0285584e8351ad8a73a (patch) | |
| tree | d32890c80b25a3150c9059cde1231b8a45132c19 /Library/Homebrew/test | |
| parent | 3e5ccaf3d2761697a67260bb1ad50be922afe57c (diff) | |
| download | brew-7a00f03c92607f65336be0285584e8351ad8a73a.tar.bz2 | |
utils: tell people to report deprecations to tap.
This should hopefully avoid Homebrew/brew or Homebrew/homebrew-core
having these exceptions reported to us.
Diffstat (limited to 'Library/Homebrew/test')
| -rw-r--r-- | Library/Homebrew/test/test_utils.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_utils.rb b/Library/Homebrew/test/test_utils.rb index bf1913784..559e60c94 100644 --- a/Library/Homebrew/test/test_utils.rb +++ b/Library/Homebrew/test/test_utils.rb @@ -223,4 +223,17 @@ class UtilTests < Homebrew::TestCase s = truncate_text_to_approximate_size(long_s, n, :front_weight => 1.0) assert_equal(("x" * (n - glue.length)) + glue, s) end + + def test_odeprecated + ARGV.stubs(:homebrew_developer?).returns false + e = assert_raises(FormulaMethodDeprecatedError) do + odeprecated("method", "replacement", + :caller => ["#{HOMEBREW_LIBRARY}/Taps/homebrew/homebrew-core/"], + :die => true) + end + assert_match "method", e.message + assert_match "replacement", e.message + assert_match "homebrew/homebrew-core", e.message + assert_match "homebrew/core", e.message + end end |
