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_CALLSSo, to match page['some_id'].toggle you use:
assert_rjs :page, 'some_id', :toggleYou 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, :everywhereFinally, 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.


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?
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.
http://geekonomics.blogspot.com/2006/09/arts-on-rspec-on-rails.html
Keep up the good work!
Jake
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 = HTML::Document.new(@response.body.gsub('\\','')) 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}" endwhich is a rip off of the assert_tag source
anyways—it works for me!