aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/test_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/test/test_test.rb')
-rw-r--r--activesupport/test/test_test.rb34
1 files changed, 34 insertions, 0 deletions
diff --git a/activesupport/test/test_test.rb b/activesupport/test/test_test.rb
new file mode 100644
index 0000000000..63a44e9379
--- /dev/null
+++ b/activesupport/test/test_test.rb
@@ -0,0 +1,34 @@
+require File.dirname(__FILE__) + '/abstract_unit'
+
+class AssertDifferenceTest < Test::Unit::TestCase
+
+ def setup
+ @object = Class.new { attr_accessor :num }.new
+ end
+
+ def test_assert_no_difference
+ @object.num = 0
+
+ assert_no_difference @object, :num do
+ # ...
+ end
+
+ end
+ def test_assert_difference
+ @object.num = 0
+
+
+ assert_difference @object, :num, +1 do
+ @object.num = 1
+ end
+
+ end
+
+ def test_methods_available
+
+ assert self.respond_to?(:assert_difference)
+ assert self.respond_to?(:assert_no_difference)
+
+ end
+
+end