views:

38

answers:

2

I'm building a Rails 3 app. I'm trying to learn Cucumber with Capybara.

  • Do I need JRuby to run Capybara via Cucumber?

I've used Webrat, but many people seem to be using Capybara, so I'd love to try.

I don't need JavaScript testing right away, but I want to install Capybara if I need in the end.

I read and read the Capybara documentation, but couldn't understand.

+1  A: 

I haven't used Capybara myself, but from what I can glean from the readme, it doesn't look like it requires JRuby, depending on the JavaScript driver you use. For instance, if you want to use Culerity, then yes you need JRuby, since it needs to be in your path.

Are you having difficulty installing Capybara?

Matt Ball
So, what driver does Capybara use by default? Selenium? Selenium seems to be more hassle than JRuby!
TK
@TK: using Selenium as the driver (2.0, aka WebDriver, **not** RC) seems pretty simple to set up. Looks like you only need to have Firefox installed.
Matt Ball
The default driver is rack-test.
dhofstet
+1  A: 

Capybara does not require jRuby or the Selenium-RC drivers.

Simply do the following to setup Cucumber with Capybara.

$ gem install capybara cucumber
$ rails generate cucumber --capybara
Ariejan