diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-25 23:34:53 +0200 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-25 23:39:34 +0200 |
commit | 9cafc28874a681082f9f7e1e445db91f195a25ae (patch) | |
tree | 6504cf5ab233e716173a416012f9e908764c9e9e /activesupport/test/core_ext/module | |
parent | 7fd0a6de849606b5449c55e41151d556d14ef75d (diff) | |
download | rails-9cafc28874a681082f9f7e1e445db91f195a25ae.tar.gz rails-9cafc28874a681082f9f7e1e445db91f195a25ae.tar.bz2 rails-9cafc28874a681082f9f7e1e445db91f195a25ae.zip |
Removed deprecated methods and related tests from ActiveSupport
Diffstat (limited to 'activesupport/test/core_ext/module')
-rw-r--r-- | activesupport/test/core_ext/module/attr_accessor_with_default_test.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb b/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb deleted file mode 100644 index 0ecd16b051..0000000000 --- a/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +++ /dev/null @@ -1,39 +0,0 @@ -require 'abstract_unit' -require 'active_support/core_ext/module/attr_accessor_with_default' - -class AttrAccessorWithDefaultTest < ActiveSupport::TestCase - def setup - @target = Class.new do - def helper - 'helper' - end - end - @instance = @target.new - end - - def test_default_arg - assert_deprecated do - @target.attr_accessor_with_default :foo, :bar - end - assert_equal(:bar, @instance.foo) - @instance.foo = nil - assert_nil(@instance.foo) - end - - def test_default_proc - assert_deprecated do - @target.attr_accessor_with_default(:foo) {helper.upcase} - end - assert_equal('HELPER', @instance.foo) - @instance.foo = nil - assert_nil(@instance.foo) - end - - def test_invalid_args - assert_raise(ArgumentError) do - assert_deprecated do - @target.attr_accessor_with_default :foo - end - end - end -end |