diff options
author | Scott Stewart <scottpstewart@gamil.com> | 2012-07-12 22:50:45 -0400 |
---|---|---|
committer | Scott Stewart <scottpstewart@gamil.com> | 2012-07-12 22:50:45 -0400 |
commit | acec6d3b780e082bfaa33abde770cee6d049943c (patch) | |
tree | c7d1dc259785ac204aa12d49d0e2223fe0fe21b3 /guides/source/testing.textile | |
parent | 1f87adfbb0a1f0d9be5c1eea33a7ef675a913b49 (diff) | |
download | rails-acec6d3b780e082bfaa33abde770cee6d049943c.tar.gz rails-acec6d3b780e082bfaa33abde770cee6d049943c.tar.bz2 rails-acec6d3b780e082bfaa33abde770cee6d049943c.zip |
Change Assertion language to Expected/Actual from obj1/obj2
Diffstat (limited to 'guides/source/testing.textile')
-rw-r--r-- | guides/source/testing.textile | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/guides/source/testing.textile b/guides/source/testing.textile index d35be6a70e..947c491d8d 100644 --- a/guides/source/testing.textile +++ b/guides/source/testing.textile @@ -377,12 +377,12 @@ There are a bunch of different types of assertions you can use. Here's the compl |_.Assertion |_.Purpose| |+assert( boolean, [msg] )+ |Ensures that the object/expression is true.| -|+assert_equal( obj1, obj2, [msg] )+ |Ensures that +obj1 == obj2+ is true.| -|+assert_not_equal( obj1, obj2, [msg] )+ |Ensures that +obj1 == obj2+ is false.| -|+assert_same( obj1, obj2, [msg] )+ |Ensures that +obj1.equal?(obj2)+ is true.| -|+assert_not_same( obj1, obj2, [msg] )+ |Ensures that +obj1.equal?(obj2)+ is false.| +|+assert_equal( expected, actual, [msg] )+ |Ensures that +expected == actual+ is true.| +|+assert_not_equal( expected, actual, [msg] )+ |Ensures that +expected != actual+ is true.| +|+assert_same( expected, actual, [msg] )+ |Ensures that +expected.equal?(actual)+ is true.| +|+assert_not_same( expected, actual, [msg] )+ |Ensures that +!expected.equal?(actual)+ is true.| |+assert_nil( obj, [msg] )+ |Ensures that +obj.nil?+ is true.| -|+assert_not_nil( obj, [msg] )+ |Ensures that +obj.nil?+ is false.| +|+assert_not_nil( obj, [msg] )+ |Ensures that +!obj.nil?+ is true.| |+assert_match( regexp, string, [msg] )+ |Ensures that a string matches the regular expression.| |+assert_no_match( regexp, string, [msg] )+ |Ensures that a string doesn't match the regular expression.| |+assert_in_delta( expecting, actual, delta, [msg] )+ |Ensures that the numbers +expecting+ and +actual+ are within +delta+ of each other.| |