public
Description: cheat sheet repository for chit
Homepage:
Clone URL: git://github.com/robin/chitsheet.git
robin (author)
Wed Jul 09 03:11:05 -0700 2008
commit  4d546432dd5b473dbbb5883f19cacc71b4599483
tree    d2371207000e34eb8ae02337f9e5c2f03ffdd22d
parent  8b2c5772e458466c24b4c2360fcf24e8b3b72468
chitsheet / arts.yml
100644 30 lines (25 sloc) 1.387 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
---
arts: |-
  ARTS is Another RJS Test System
  
  For a complete tutorial, see http://glu.ttono.us/articles/2006/05/29/guide-test-driven-rjs-with-arts.
  
  Usage:
    assert_rjs :alert, 'Hi!'
    assert_rjs :assign, 'a', '2'
    assert_rjs :call, 'foo', 'bar', 'baz'
    assert_rjs :draggable, 'draggable_item'
    assert_rjs :drop_receiving, 'receiving_item'
    assert_rjs :hide, "post_1", "post_2", "post_3"
    assert_rjs :insert_html, :bottom, 'posts'
    assert_rjs :redirect_to, :action => 'list'
    assert_rjs :remove, "post_1", "post_2", "post_3"
    assert_rjs :replace, 'completely_replaced_div'
    assert_rjs :replace, 'completely_replaced_div', '<p>This replaced the div</p>'
    assert_rjs :replace, 'completely_replaced_div', /replaced the div/
    assert_rjs :replace_html, 'replaceable_div', "This goes inside the div"
    assert_rjs :show, "post_1", "post_2", "post_3"
    assert_rjs :sortable, 'sortable_item'
    assert_rjs :toggle, "post_1", "post_2", "post_3"
    assert_rjs :visual_effect, :highlight, "posts", :duration => '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'