Webapp testing with Webrat and [your language]
Webrat was written mainly to improve Rails` web applications testing. But what if webapp is written in something else? The answer is simple - webrat!
Requirements: Ruby
Installation: gem install mechanize webrat Done.
Now create file test.rb and put in there:
To run tests use command: spec test.rb
For colorful and more readable output use: spec --color --format specdoc test.rb

That`s almost all. While it works pretty well having all tests in one file is not what we are used to after working with Rails. Let`s fix that by splitting that code into spec_helper.rb and login_spec.rb files.
simple Rakefile for running all tests
and spec.opts
Now you can run test with rake spec command. Note that files with tests must end with _spec.rb in order to get executed by spec command.
Textmate integration
It is possible to run specs from Textmate via ruby-rspec bundle. Just clone repository, double click on ruby-rspec.bundle, open test file and press ⌘ + R to get something like: