|
Selenium is a great way to test your app automatically through a browser. See how it works in this episode.
script/plugin install git://github.com/ryanb/selenium-on-rails.gitscript/generate selenium destroy_product.rsel# test/selenium/destroy_product.rselsetup :fixtures => :allproduct = Product.firstopen '/'click "css=#product_#{product.id} a:contains('Destroy')"assert_confirmation('*')wait_for_element_present "css=#flash_notice"assert_element_not_present "css=#product_#{product.id}"refreshassert_element_not_present "css=#product_#{product.id}"# config/selenium.ymlenvironments: - testbrowsers: firefox: '/Applications/Firefox.app/Contents/MacOS/firefox-bin' |
|