Active Resource Integration Dsl plugin
Plugin details
Documentation
ruby script/plugin install svn://rubyforge.org/var/svn/arid/trunk
Example usage
new_session_as('bob','bobs_password') do |bob| bob.edits_article(1,:params => {:subject => 'Hello World', :body => 'Testing 123'}) end
Will
* Login to the application as 'bob'
* GET edit_article_path(1)
* Check that the response includes a form will POST to article_path(1)
* Check that the form contains a hidden field named '_method' with a value of 'put'
* Check that the form contains appropriate fields for the user to input 'article[subject]' and 'article[body]'
* Submit the form and assert a redirect
* Follow the redirect and assert a success
All methods take blocks to provide your own custom assertions, and options to modify behavior.
One *major* assumption ARID makes is that your users login through a SessionsController that accepts :username and :password params. This can be easily changed by overriding new_session_as with your own method to get users logged in. (I'm actually doing this on one application.)
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | (0 older versions) | Last edited by: scott, 7 months ago

