tracks/tracks/vendor/plugins/arts/README
lukemelia c51587e422 * Converted Todo to acts_as_state_machine. It's states are active, deferred, completed, and project_hidden. This replaces the old single inheritance model of Immediate and Deferred. Also renamed todo.completed to todo.completed_at for clarity
* Consolidated toggle_check handling to todo_controller and rjs  
* Introduced user preference to show/hide hidden projects section in sidebar
* Fixed a bug in parse_date_per_user_prefs that was causing due dates to be set in the todo model as Times and not Dates
* Upgraded ARTS plugin
* This changeset includes migrations, so remember to db:migrate.
* Lots of code changes here, so bug reports will be gratefully accepted!



git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@343 a4c988fc-2ded-0310-b66e-134b36920a42
2006-11-15 09:05:07 +00:00

28 lines
1.3 KiB
Text

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'