Rails Conf 2009 Third Day of Sessions
Last night I chose quantity over quality and ate at a Brazilian steak house. Good times. Webrat: Rails Acceptance Testing Evolved Bryan Helmkamp (weplay) Bryan started out his presentation by handing out Tylenol for those who went out last night and Budwiser for those who didn't. The crowd was appreciative. Bryan show some typical Rails integration testing (simulating clicking through the app without opening up the browser) and compared it to the same test in Webrat. The difference between the integration test and the webrat enabled test was pretty dramatic. The Webrat test was much cleaner and easier to read. Webrat parses the returned html with Nokogiri (which he highly recommends) and so can do some pretty interesting stuff. click_link, fill_in, check (and uncheck), choose, select, attach_file, and click_button all have a simple syntax. Webrat automatically is checking for the success of the request so you don't have to assert success everywhere. It also verifies t...