From b451de0d6de4df6bc66b274cec73b919f823d5ae Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Sat, 14 Aug 2010 02:13:00 -0300 Subject: Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;) --- activesupport/test/core_ext/module/anonymous_test.rb | 2 +- .../core_ext/module/attr_accessor_with_default_test.rb | 8 ++++---- .../test/core_ext/module/attribute_accessor_test.rb | 2 +- .../test/core_ext/module/attribute_aliasing_test.rb | 6 +++--- activesupport/test/core_ext/module/reachable_test.rb | 16 ++++++++-------- 5 files changed, 17 insertions(+), 17 deletions(-) (limited to 'activesupport/test/core_ext/module') diff --git a/activesupport/test/core_ext/module/anonymous_test.rb b/activesupport/test/core_ext/module/anonymous_test.rb index 7a78a3b012..cb556af772 100644 --- a/activesupport/test/core_ext/module/anonymous_test.rb +++ b/activesupport/test/core_ext/module/anonymous_test.rb @@ -6,7 +6,7 @@ class AnonymousTest < ActiveSupport::TestCase assert Module.new.anonymous? assert Class.new.anonymous? end - + test "a named class or module are not anonymous" do assert !Kernel.anonymous? assert !Object.anonymous? 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 index 7c0d0bb242..9494ca9ef6 100644 --- a/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb +++ b/activesupport/test/core_ext/module/attr_accessor_with_default_test.rb @@ -7,24 +7,24 @@ class AttrAccessorWithDefaultTest < Test::Unit::TestCase def helper 'helper' end - 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 diff --git a/activesupport/test/core_ext/module/attribute_accessor_test.rb b/activesupport/test/core_ext/module/attribute_accessor_test.rb index 67fcd437d0..118fb070a0 100644 --- a/activesupport/test/core_ext/module/attribute_accessor_test.rb +++ b/activesupport/test/core_ext/module/attribute_accessor_test.rb @@ -32,7 +32,7 @@ class ModuleAttributeAccessorTest < Test::Unit::TestCase assert_respond_to @object, :bar assert !@object.respond_to?(:bar=) end - + def test_should_not_create_instance_reader assert_respond_to @module, :shaq assert !@object.respond_to?(:shaq) diff --git a/activesupport/test/core_ext/module/attribute_aliasing_test.rb b/activesupport/test/core_ext/module/attribute_aliasing_test.rb index f17d031662..065c3531e0 100644 --- a/activesupport/test/core_ext/module/attribute_aliasing_test.rb +++ b/activesupport/test/core_ext/module/attribute_aliasing_test.rb @@ -44,14 +44,14 @@ class AttributeAliasingTest < Test::Unit::TestCase # upper-case attributes, and when people want to alias those names # to more sensible ones, everything goes *foof*. e = AttributeAliasing::Email.new - + assert !e.body? assert !e.Data? - + e.body = "No, really, this is not a joke." assert_equal "No, really, this is not a joke.", e.Data assert e.Data? - + e.Data = "Uppercased methods are teh suck" assert_equal "Uppercased methods are teh suck", e.body assert e.body? diff --git a/activesupport/test/core_ext/module/reachable_test.rb b/activesupport/test/core_ext/module/reachable_test.rb index 72892b77d5..80eb31a5c4 100644 --- a/activesupport/test/core_ext/module/reachable_test.rb +++ b/activesupport/test/core_ext/module/reachable_test.rb @@ -6,33 +6,33 @@ class AnonymousTest < ActiveSupport::TestCase assert !Module.new.reachable? assert !Class.new.reachable? end - + test "ordinary named classes or modules are reachable" do assert Kernel.reachable? assert Object.reachable? end - + test "a named class or module whose constant has gone is not reachable" do c = eval "class C; end; C" m = eval "module M; end; M" - + self.class.send(:remove_const, :C) self.class.send(:remove_const, :M) - + assert !c.reachable? assert !m.reachable? end - + test "a named class or module whose constants store different objects are not reachable" do c = eval "class C; end; C" m = eval "module M; end; M" - + self.class.send(:remove_const, :C) - self.class.send(:remove_const, :M) + self.class.send(:remove_const, :M) eval "class C; end" eval "module M; end" - + assert C.reachable? assert M.reachable? assert !c.reachable? -- cgit v1.2.3