ARTS 0.5 Released

Posted by kev Sat, 16 Sep 2006 01:54:00 GMT

Today I checked in version 0.5 of ARTS into my plugin repository. This release adds support for page['some_id'].toggle and friends.

In general the assertion looks like:

assert_rjs :page, ELEMENT_ID, *METHOD_CALLS

So, to match page['some_id'].toggle you use:

assert_rjs :page, 'some_id', :toggle

You can continue to string as many method calls as you’d like. To match page['some_id'].toggle.up.down.left.right.everywhere:

assert_rjs :page, 'some_id', :toggle, :up, :down, :left, :right, :everywhere

Finally, for assignment make sure to append an ‘=’ to the method name and include the value. For example, to match page['some_id'].style.color = 'red':

assert_rjs :page, 'some_id', :style, :color=, 'red'

Go check it out.

Posted in ,  | 3 comments


  1. Avatar Joe said 6 days later:

    Hi Kevin,

    I was trying to use Arts with my integration tests… it looks like this is n’t support as I get the following error:

    NoMethodError: undefined method `assert_rjs’ for ActionController::Integration::Session

    Is there a way to have Arts work for integration tests?

  2. Avatar jakehow said 6 days later:

    Hey Kevin…

    I think ARTS is a great project… but I have moved over from Test::Unit to RSpec… I just got ARTS up and running in RSpec so I have the best of both worlds now.

    Keep up the good work!


  3. Avatar Caleb Buxton said 16 days later:

    Hey man,

    Trés Cool.

    thought i’d share something that i added to it to support the assert_tag functionality

    its a bit of a hack job

    I modified extract_matchable_content to pass up hashes and and added a when for Hash in the content cases that is

    html_doc ='\\','')) clean_backtrace do #content = content.size > 1 ? content.last.merge({ :tag => content.first.to_s }) : content.first tag = html_doc.find(content) assert tag, "expected tag, but no tag found matching #{content.inspect} in:\n#{@response.body.inspect}" end

    which is a rip off of the assert_tag source

    anyways—it works for me!

Comments are disabled