<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -19,4 +19,10 @@ Usage:
   assert_rjs :show, &quot;post_1&quot;, &quot;post_2&quot;, &quot;post_3&quot;
   assert_rjs :sortable, 'sortable_item'
   assert_rjs :toggle, &quot;post_1&quot;, &quot;post_2&quot;, &quot;post_3&quot;
-  assert_rjs :visual_effect, :highlight, &quot;posts&quot;, :duration =&gt; '1.0'    
+  assert_rjs :visual_effect, :highlight, &quot;posts&quot;, :duration =&gt; '1.0'
+
+For the square bracket syntax (page['some_id'].toggle) use :page followed by the id and then subsequent method calls. Assignment requires a '=' at the end of the method name followed by the value.
+
+  assert_rjs :page, 'some_id', :toggle
+  assert_rjs :page, 'some_id', :style, :color=, 'red'
+</diff>
      <filename>README</filename>
    </modified>
    <modified>
      <diff>@@ -85,8 +85,31 @@ module Arts
     end
   end
   
+  # To deal with [] syntax. I hate JavaScriptProxy so.. SO very much
+  def assert_rjs_page(*args)
+    content = build_method_chain!(args)
+    assert_match Regexp.new(Regexp.escape(content)), @response.body, 
+                 &quot;Content did not include:\n #{content.to_s}&quot;
+  end
+  
   protected
   
+  def build_method_chain!(args)
+    content = create_generator.send(:[], args.shift) # start $('some_id')....
+    
+    while !args.empty?
+      if (method = args.shift.to_s) =~ /(.*)=$/
+        content = content.__send__(method, args.shift)
+        break
+      else
+        content = content.__send__(method)
+        content = content.__send__(:function_chain).first if args.empty?
+      end
+    end
+    
+    content
+  end
+  
   def lined_response
     @response.body.split(&quot;\n&quot;)
   end
@@ -107,4 +130,4 @@ module Arts
       return create_generator.send(:arguments_for_call, args)
     end
   end
-end
+end
\ No newline at end of file</diff>
      <filename>lib/arts.rb</filename>
    </modified>
    <modified>
      <diff>@@ -102,6 +102,18 @@ class ArtsController &lt; ActionController::Base
     end
   end
   
+  def page_with_one_chained_method
+    render :update do |page|
+      page['some_id'].toggle
+    end
+  end
+  
+  def page_with_assignment
+    render :update do |page|
+      page['some_id'].style.color = 'red'
+    end
+  end
+  
   def rescue_errors(e) raise e end
 
 end
@@ -358,4 +370,33 @@ class ArtsTest &lt; Test::Unit::TestCase
       assert_no_rjs :visual_effect, :highlight, &quot;posts&quot;, :duration =&gt; '1.0'
     end
   end
+  
+  # [] support
+  
+  def test_page_with_one_chained_method
+    get :page_with_one_chained_method
+    assert_nothing_raised do
+      assert_rjs :page, 'some_id', :toggle
+      assert_no_rjs :page, 'some_other_id', :toggle
+    end
+    
+    assert_raises(Test::Unit::AssertionFailedError) do
+      assert_rjs :page, 'some_other_id', :toggle
+      assert_no_rjs :page, 'some_id', :toggle
+    end
+  end
+  
+  def test_page_with_assignment
+    get :page_with_assignment
+    
+    assert_nothing_raised do
+      assert_rjs :page, 'some_id', :style, :color=, 'red'
+      assert_no_rjs :page, 'some_id', :color=, 'red'
+    end
+    
+    assert_raises(Test::Unit::AssertionFailedError) do
+      assert_no_rjs :page, 'some_id', :style, :color=, 'red'
+      assert_rjs :page, 'some_other_id', :style, :color=, 'red'
+    end
+  end
 end</diff>
      <filename>test/arts_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>dfadf461450207e1095cc656a9703d05546da149</id>
    </parent>
  </parents>
  <author>
    <name>kevinc</name>
    <email>kevinc@fc021c06-de14-0410-8c5a-e664d767796e</email>
  </author>
  <url>http://github.com/richpoirier/arts/commit/60e9a69077b37127b1d575dd2369f2071ac6d8f5</url>
  <id>60e9a69077b37127b1d575dd2369f2071ac6d8f5</id>
  <committed-date>2006-09-15T18:53:15-07:00</committed-date>
  <authored-date>2006-09-15T18:53:15-07:00</authored-date>
  <message>Allow for square bracket syntax.</message>
  <tree>8e99e3963617acf652a6e2ae96149957abcc8faf</tree>
  <committer>
    <name>kevinc</name>
    <email>kevinc@fc021c06-de14-0410-8c5a-e664d767796e</email>
  </committer>
</commit>
