diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 04:12:33 -0300 |
commit | b451de0d6de4df6bc66b274cec73b919f823d5ae (patch) | |
tree | f252c4143a0adb3be7d36d543282539cca0fb971 /activesupport/test/core_ext/class | |
parent | 1590377886820e00b1a786616518a32f3b61ec0f (diff) | |
download | rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2 rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activesupport/test/core_ext/class')
-rw-r--r-- | activesupport/test/core_ext/class/attribute_accessor_test.rb | 10 | ||||
-rw-r--r-- | activesupport/test/core_ext/class/class_inheritable_attributes_test.rb | 22 |
2 files changed, 16 insertions, 16 deletions
diff --git a/activesupport/test/core_ext/class/attribute_accessor_test.rb b/activesupport/test/core_ext/class/attribute_accessor_test.rb index 2c896d0cdb..456f4b7948 100644 --- a/activesupport/test/core_ext/class/attribute_accessor_test.rb +++ b/activesupport/test/core_ext/class/attribute_accessor_test.rb @@ -10,27 +10,27 @@ class ClassAttributeAccessorTest < Test::Unit::TestCase end @object = @class.new end - + def test_should_use_mattr_default assert_nil @class.foo assert_nil @object.foo end - + def test_should_set_mattr_value @class.foo = :test assert_equal :test, @object.foo - + @object.foo = :test2 assert_equal :test2, @class.foo end - + def test_should_not_create_instance_writer assert_respond_to @class, :foo assert_respond_to @class, :foo= assert_respond_to @object, :bar assert !@object.respond_to?(:bar=) end - + def test_should_not_create_instance_reader assert_respond_to @class, :shaq assert !@object.respond_to?(:shaq) diff --git a/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb b/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb index 63ea46b564..b284e5ee1c 100644 --- a/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb +++ b/activesupport/test/core_ext/class/class_inheritable_attributes_test.rb @@ -21,7 +21,7 @@ class ClassInheritableAttributesTest < Test::Unit::TestCase assert_respond_to @klass.new, :a= end end - + def test_writer_declaration_without_instance_writer assert_nothing_raised do @klass.class_inheritable_writer :a, :instance_writer => false @@ -39,7 +39,7 @@ class ClassInheritableAttributesTest < Test::Unit::TestCase assert_respond_to @klass.new, :a= end end - + def test_accessor_declaration_without_instance_writer assert_nothing_raised do @klass.class_inheritable_accessor :a, :instance_writer => false @@ -176,37 +176,37 @@ class ClassInheritableAttributesTest < Test::Unit::TestCase assert_equal 'b', @klass.b assert_equal 'B', @sub.b end - + def test_array_inheritance @klass.class_inheritable_accessor :a @klass.a = [] @sub = eval("class SubbyArray < @klass; end; SubbyArray") - + assert_equal [], @klass.a assert_equal [], @sub.a - + @sub.a << :first - + assert_equal [:first], @sub.a assert_equal [], @klass.a end - + def test_array_inheritance_ @klass.class_inheritable_accessor :a @klass.a = {} @sub = eval("class SubbyHash < @klass; end; SubbyHash") - + assert_equal Hash.new, @klass.a assert_equal Hash.new, @sub.a - + @sub.a[:first] = :first - + assert_equal 1, @sub.a.keys.size assert_equal 0, @klass.a.keys.size end - + def test_reset_inheritable_attributes @klass.class_inheritable_accessor :a @klass.a = 'a' |