Webrat lets you quickly write robust and thorough acceptance tests for a web application. By leveraging the DOM, it can run tests similarly to an in-browser testing solution without the associated performance hit (and browser dependency). The result is tests that are less fragile and more effective at verifying that the app will respond properly to users.
Alternatively, you may want to investigate standalone Selenium or watir.
def test_sign_up visit "/" click_link "Sign up" fill_in "Email", :with => "firstname.lastname@example.org" select "Free account" click_button "Register" ... end
Behind the scenes, this will perform the following work:
Take special note of the things not specified in that test, that might cause tests to break unnecessarily as your application evolves:
A test written with Webrat can handle these changes smoothly.