aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/module
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2010-05-19 15:14:51 -0400
committerJosé Valim <jose.valim@gmail.com>2010-05-19 21:31:51 +0200
commit39a246f545a714b21c669e2f6eda4012526c3874 (patch)
tree89da32733821f0a7dcc56efdac82c72897eca424 /activesupport/test/core_ext/module
parentbdb2871df7fb0a1eeceadb31aaba4d160df508aa (diff)
downloadrails-39a246f545a714b21c669e2f6eda4012526c3874.tar.gz
rails-39a246f545a714b21c669e2f6eda4012526c3874.tar.bz2
rails-39a246f545a714b21c669e2f6eda4012526c3874.zip
Final iteration of use better testing methods
[#4652 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
Diffstat (limited to 'activesupport/test/core_ext/module')
-rw-r--r--activesupport/test/core_ext/module/attribute_accessor_test.rb8
-rw-r--r--activesupport/test/core_ext/module/synchronization_test.rb6
2 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/test/core_ext/module/attribute_accessor_test.rb b/activesupport/test/core_ext/module/attribute_accessor_test.rb
index 263e78feaa..67fcd437d0 100644
--- a/activesupport/test/core_ext/module/attribute_accessor_test.rb
+++ b/activesupport/test/core_ext/module/attribute_accessor_test.rb
@@ -27,14 +27,14 @@ class ModuleAttributeAccessorTest < Test::Unit::TestCase
end
def test_should_not_create_instance_writer
- assert @module.respond_to?(:foo)
- assert @module.respond_to?(:foo=)
- assert @object.respond_to?(:bar)
+ assert_respond_to @module, :foo
+ assert_respond_to @module, :foo=
+ assert_respond_to @object, :bar
assert !@object.respond_to?(:bar=)
end
def test_should_not_create_instance_reader
- assert @module.respond_to?(:shaq)
+ assert_respond_to @module, :shaq
assert !@object.respond_to?(:shaq)
end
end
diff --git a/activesupport/test/core_ext/module/synchronization_test.rb b/activesupport/test/core_ext/module/synchronization_test.rb
index 43d65ab249..eb850893f0 100644
--- a/activesupport/test/core_ext/module/synchronization_test.rb
+++ b/activesupport/test/core_ext/module/synchronization_test.rb
@@ -16,8 +16,8 @@ class SynchronizationTest < Test::Unit::TestCase
attr_accessor :value
synchronize :value, :with => :mutex
end
- assert @instance.respond_to?(:value_with_synchronization)
- assert @instance.respond_to?(:value_without_synchronization)
+ assert_respond_to @instance, :value_with_synchronization
+ assert_respond_to @instance, :value_without_synchronization
end
def test_synchronize_does_not_change_behavior
@@ -81,7 +81,7 @@ class SynchronizationTest < Test::Unit::TestCase
class << @target
synchronize :to_s, :with => :mutex
end
- assert @target.respond_to?(:to_s_without_synchronization)
+ assert_respond_to @target, :to_s_without_synchronization
assert_nothing_raised { @target.to_s; @target.to_s }
assert_equal 2, @target.mutex.sync_count
end