aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/assertions.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-05-06 16:42:01 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-05-06 16:42:01 +0000
commit409bc0970aa6145dfaeb6d79363a74e0244002a0 (patch)
tree1f24cbb1693132b7820ba2f8896a727ef394df80 /actionpack/lib/action_controller/assertions.rb
parent483931ea615d49a31d6de225f273e0945ad6cbb3 (diff)
downloadrails-409bc0970aa6145dfaeb6d79363a74e0244002a0.tar.gz
rails-409bc0970aa6145dfaeb6d79363a74e0244002a0.tar.bz2
rails-409bc0970aa6145dfaeb6d79363a74e0244002a0.zip
Added functionality to assert_tag, so you can now do tests on the siblings of a node, to assert that some element comes before or after the element in question, or just to assert that some element exists as a sibling #1226 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1291 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/assertions.rb')
-rw-r--r--actionpack/lib/action_controller/assertions.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/assertions.rb b/actionpack/lib/action_controller/assertions.rb
index 00388f8f59..5d1826b72a 100644
--- a/actionpack/lib/action_controller/assertions.rb
+++ b/actionpack/lib/action_controller/assertions.rb
@@ -136,6 +136,12 @@ module Test #:nodoc:
# meet the criteria described by the hash.
# * <tt>:descendant</tt>: a hash. At least one of the node's descendants
# must meet the criteria described by the hash.
+ # * <tt>:sibling</tt>: a hash. At least one of the node's siblings must
+ # meet the criteria described by the hash.
+ # * <tt>:after</tt>: a hash. The node must be after any sibling meeting
+ # the criteria described by the hash, and at least one sibling must match.
+ # * <tt>:before</tt>: a hash. The node must be before any sibling meeting
+ # the criteria described by the hash, and at least one sibling must match.
# * <tt>:children</tt>: a hash, for counting children of a node. Accepts
# the keys:
# * <tt>:count</tt>: either a number or a range which must equal (or