Posted by Eric Kidd Wed, 15 Feb 2006 08:06:00 GMT
Like most Ruby on Rails developers, I write lots of test cases for my models and controllers. This lets me add new features quickly, without worrying about breakage: My test cases act as a safety net, warning me whenever existing code fails.
test.setup # Load fixtures test.open :controller => 'customer', :action => 'list' test.assert_title 'Customers' test.click 'myLink', :wait => true test.assert_title 'Customer: *'
These test cases actually run in your browser, loading pages and clicking links just as a user would. As the above example shows, you have full access to the Rails environment, including URL routing and configuration data.Read more...