From bb1d3c1f8eae54abae0f97440d6986e25b528b86 Mon Sep 17 00:00:00 2001 From: Pavel Pravosud Date: Sat, 15 Dec 2012 20:57:45 +0700 Subject: AS::BasicObject can be inherited from --- activesupport/test/deprecation/basic_object_test.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 activesupport/test/deprecation/basic_object_test.rb (limited to 'activesupport/test') 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 -- cgit v1.2.3