Forum: Ruby on Rails [ANN] The ARTS Plugin: Another RJS Testing System

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
6f792b946bbf30845314eb501da5e040?d=identicon&s=25 Kevin Clark (Guest)
on 2006-05-30 21:04
If you missed it, I've written a plugin for testing RJS that uses
(basically) the same syntax as the RJS templates themselves. Here's a
taste:

  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', '<p>This replaced the
div</p>'
  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'

It also allows for optional content matching on methods where it matters
(insert_html et al).

A full tutorial is here:
http://glu.ttono.us/articles/2006/05/29/guide-test...

Kev
This topic is locked and can not be replied to.