On Saturday, July 28, 2012 7:20:19 PM UTC+1, Ruby-Forum.com User wrote: > > Are Capybara and cucumber different to Rspec? > > Capybara (and webrat before it) are tools for simulating (or driving) browsers with lots of methods for executing common actions, interacting with the DOM.
rspec, cucumber and test::unit are all libraries (or DSLs) for writing tests. Capybara is commonly paired with cucumber, but you can easily use capybara with rspec and there's an adapter for test::unit too. There are a lot of tools, but they serve different purposes - I think you'd be less confused if you understood their nuances: there aren't 10 different approaches to testing, but there are 2-3 approaches to the web acceptance side (webrat/capybara), fixtures (fixtures or factory girl), basic testing setup (cucumber, rspec, test::unit). Spork, guard, autotest are more infrastructury things: guard helps you run tests automatically when related files have changed whereas spork (or spin) help making running small amounts of tests fast by caching the loading of the rails app. So lots of things where there are 2-3 approaches which multiplied together do make for a larger number of total possibilities. As to why there are several alternatives to most components, that's pretty simple: People don't agree on the best way to do things. Some people love fixtures, other people hate it, the same goes for rspec. Sometimes projects just fall by the wayside slightly and lose momentum, eg capybara has pretty much superseded webrat. Fred -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/ao7u6W6PPLEJ. For more options, visit https://groups.google.com/groups/opt_out.