Posts [ 2 ]

Topic: Problems with capybara and cucumber

Hi folks,

i'm starting with BDD and i'm using rails3, spec, capybara and cucumber... but the problem is.. after downloading all the gems and running: script/rails generate rspec:install and the cucumber:install --rspec --capybarathere is a features directory but for example the paths.rb is missing... also the default step definitions are missing... and also there is no generator for generating features....

so i search google but i don't find how to make capybara's default step definitions work... for example i found on the internet that there should be for example such a step definitions

Given /^(?:|I )am on (.+)$/ do |page_name|
visit path_to(page_name)
end

and basically there should be a paths.rb with stuff in it where i should add something like

when /task index page/
tasks_path()

but as i told you there is no paths.rb... so i created it myself and put

Re: Problems with capybara and cucumber

I just started playing with examples in Rails 3 in Action and encountered the same problem.It looks like cucumber-rails changed their implementations from 1.0.6 to 1.1.0.https://github.com/cucumber/cucumber-ra History.mdSo, it no longer generates all those helpful files we used to have.If you really want those files back, install the version 1.0.6.Then, you should be ready to go.If you want to follow the current philosophy that cucumber-rails team has decided, you should follow their recommended ways.