From eca93d0970925a305c6ccc620df62aeb385938dc Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Sun, 28 Jan 2007 00:47:32 +0000 Subject: Rename test file so it's not ignored by rake git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6049 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../core_ext/module/attr_accessor_with_default.rb | 30 ---------------------- .../module/attr_accessor_with_default_test.rb | 30 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 30 deletions(-) delete mode 100644 activesupport/test/core_ext/module/attr_accessor_with_default.rb create mode 100644 activesupport/test/core_ext/module/attr_accessor_with_default_test.rb (limited to 'activesupport/test') diff --git a/activesupport/test/core_ext/module/attr_accessor_with_default.rb b/activesupport/test/core_ext/module/attr_accessor_with_default.rb deleted file mode 100644 index 8ae52ad17a..0000000000 --- a/activesupport/test/core_ext/module/attr_accessor_with_default.rb +++ /dev/null @@ -1,30 +0,0 @@ -require File.dirname(__FILE__) + '/../../abstract_unit' - -class AttrWithDefaultTest < Test::Unit::TestCase - def setup - @target = Class.new do - def helper - 'helper' - end - end - @instance = @target.new - end - - def test_default_arg - @target.attr_accessor_with_default :foo, :bar - assert_equal(:bar, @instance.foo) - @instance.foo = nil - assert_nil(@instance.foo) - end - - def test_default_proc - @target.attr_accessor_with_default(:foo) {helper.upcase} - assert_equal('HELPER', @instance.foo) - @instance.foo = nil - assert_nil(@instance.foo) - end - - def test_invalid_args - assert_raise(RuntimeError) {@target.attr_accessor_with_default :foo} - end -end \ No newline at end of file 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 new file mode 100644 index 0000000000..8ae52ad17a --- /dev/null +++ b/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb @@ -0,0 +1,30 @@ +require File.dirname(__FILE__) + '/../../abstract_unit' + +class AttrWithDefaultTest < Test::Unit::TestCase + def setup + @target = Class.new do + def helper + 'helper' + end + end + @instance = @target.new + end + + def test_default_arg + @target.attr_accessor_with_default :foo, :bar + assert_equal(:bar, @instance.foo) + @instance.foo = nil + assert_nil(@instance.foo) + end + + def test_default_proc + @target.attr_accessor_with_default(:foo) {helper.upcase} + assert_equal('HELPER', @instance.foo) + @instance.foo = nil + assert_nil(@instance.foo) + end + + def test_invalid_args + assert_raise(RuntimeError) {@target.attr_accessor_with_default :foo} + end +end \ No newline at end of file -- cgit v1.2.3