It looks like those aliases are not loaded properly. I’m using Rails 3.X, rspec 2.8 and capybara 1.1.2 to write some integration tests.
I think that my installation of Capybara is successful as it all works with the standard ‘describe’ and ‘it’ tags, but ‘feature’ and ‘scenario’ aliases from Capybara throw an ‘undefined method’ error.
I don’t see anything in the documentation mentioning more configuration:
https://github.com/jnicklas/capybara
I have simply added the ‘require capybara/rspec’ in my spec_helper.rb
It seems like you can’t combine describe/it with feature/scenario syntax. I was getting the same error when I nested a
scenarioblock inside adescribeblock. Once I replaced thedescribewithfeature, the test ran. One gotcha: It also does not seem to like nestedfeatureblocks, which I guess makes sense in the context of acceptance testing.UPDATE
I dug into Capybara’s source code, and
beforeanditdon’t get aliased bybackgroundandscenariounless thedescribeblock gets created withcapybara_feature => truewhich happens when you create the block withfeatureinstead ofdescribe.