This is the sample application I used in my talk about "Acceptance testing with Steak and Capybara" I gave in the Madrid-rb February 2010 meeting. Slides can be read and downloaded at SlideShare (in spanish).
It's a (very) simple Rails application tested with Steak and Capybara. You can follow the development process using the tags (git checkout 1
, git checkout 2
, etc.). Once at the end, you can run the tests (and read the configurations needed) with the different adapters using the rack_test
, selenium
and culerity
branches.
- Initial status, just after generating the rails app
- We generated the RSpec and Steak configurations
- We configured Steak to use Capybara
- We implemented our first feature (tested with RackTest)
- We implemented our second feature (tested with RackTest)
- We converted that second feature to Ajax, in an unobstrusive way so RackTest tests still pass
- We configured Capybara to use Selenium and ran the same tests. Although that change is not checked in, we commented
app/controllers/talks_controller.rb:10
to demostrate we were actually running the Ajax version - We configured Capybara to use Culerity and repeated the same tests again
Then we went to Las Jarritas and drank a lot of beer ;)