Using Raakt in Ruby on Rails

Using Raakt in Ruby on Rails is easily done by adding a custom assertion method to the Test::Unit::TestCase class. Open the file test_helper.rb in the test folder in your Rails application. Add the following method to the class Test::Unit::TestCase:

def assert_basic_accessibiliy  
  rt =  
  result = rt.all  
  assert result.length == 0, result.collect { |msg| "\n" + msg.text + "\n" }  

Now you can test all views that render a complete HTML document by calling assert_basic_accessibiliy in your functional tests.

frameworks/rails.txt · Last modified: 2007-03-09 11:21 by peterkz
Recent changes RSS feed, Powered by DokuWiki