diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-15 13:59:17 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2012-12-15 13:59:17 -0800 |
commit | 2d6abcce55c9024e2ef8753ab710b8a053e96eec (patch) | |
tree | 50734e92e8c2f93d2a2f92eecc5d44467eb9b00e /activesupport/test | |
parent | d72a07f1d1478db9daed847eadb35bfd840674f6 (diff) | |
parent | bb1d3c1f8eae54abae0f97440d6986e25b528b86 (diff) | |
download | rails-2d6abcce55c9024e2ef8753ab710b8a053e96eec.tar.gz rails-2d6abcce55c9024e2ef8753ab710b8a053e96eec.tar.bz2 rails-2d6abcce55c9024e2ef8753ab710b8a053e96eec.zip |
Merge pull request #8518 from rwz/inheritable-basic-object
Properly deprecate AS::BasicObject without breaking subclasses of it
Diffstat (limited to 'activesupport/test')
-rw-r--r-- | activesupport/test/deprecation/basic_object_test.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/activesupport/test/deprecation/basic_object_test.rb b/activesupport/test/deprecation/basic_object_test.rb new file mode 100644 index 0000000000..4b5bed9eb1 --- /dev/null +++ b/activesupport/test/deprecation/basic_object_test.rb @@ -0,0 +1,12 @@ +require 'abstract_unit' +require 'active_support/deprecation' +require 'active_support/basic_object' + + +class BasicObjectTest < ActiveSupport::TestCase + test 'BasicObject warns about deprecation when inherited from' do + warn = 'ActiveSupport::BasicObject is deprecated! Use ActiveSupport::ProxyObject instead.' + ActiveSupport::Deprecation.expects(:warn).with(warn).once + Class.new(ActiveSupport::BasicObject) + end +end
\ No newline at end of file |