aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test
diff options
context:
space:
mode:
authorMike McQuaid2014-10-16 12:58:34 +0100
committerMike McQuaid2014-10-19 13:58:52 +0100
commit2db08f52e4c71d01e5596e56ac4d19414a7cde3d (patch)
tree889a93b7d7434c25f097b6f95d749ba91b2da294 /Library/Homebrew/test
parentb5a2d1ade4ae9a23c8458c30b5b3b689bc3a5785 (diff)
downloadhomebrew-2db08f52e4c71d01e5596e56ac4d19414a7cde3d.tar.bz2
Add DeprecatedOption class.
Used to capture options that are being renamed.
Diffstat (limited to 'Library/Homebrew/test')
-rw-r--r--Library/Homebrew/test/test_options.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/Library/Homebrew/test/test_options.rb b/Library/Homebrew/test/test_options.rb
index 73ff2b752..1bd5ba3b0 100644
--- a/Library/Homebrew/test/test_options.rb
+++ b/Library/Homebrew/test/test_options.rb
@@ -25,6 +25,20 @@ class OptionTests < Homebrew::TestCase
end
end
+class DeprecatedOptionTests < Homebrew::TestCase
+ def setup
+ @deprecated_option = DeprecatedOption.new("foo", "bar")
+ end
+
+ def test_old
+ assert_equal "foo", @deprecated_option.old
+ end
+
+ def test_current
+ assert_equal "bar", @deprecated_option.current
+ end
+end
+
class OptionsTests < Homebrew::TestCase
def setup
@options = Options.new