The new features in cucumber BDD for rails have been released by its developer, now ‘web_step.rb’ is no longer required. Sounds crazy?
Sorry friends,first let me introduce what a web_steps.rb in cucumber is..
IN previous version of cucumber this web_steps.rb file was used for defining some basic functions so that pending cases outcome of cucumber test reduces rapidly.
if still some cases arises as pending after test then define them inside step_definition folder.
so now topic come how to install cucumber in rail3.1 below the steps…
1. create a new rail application.
2.add required gem
gem ‘mysql’
gem ‘therubyracer’
gem ‘execjs’
gem ‘minitest’
add the following group completely..
group :test, :development do
gem ‘cucumber-rails’ #this has to be added in addition to below group :test do block
gem ‘database_cleaner’
end
and please please dont delete
group :test do
# Pretty printed test output
gem ‘turn’, :require => false
end
3.Bundle Install
4. Rails g cucumber: install # this will create all feature folder and its applcation
5. oops.. sorry i forgot configure database.yml file
so configure it..
6.then bundle exec cucumber
this will take us to result of cucumber test.
But friends cucumber developers have removed web_step.rb, path.rb, selectors.rb files from their new version but still as a new cucumber rider you may want those
so for you to experience these file features too
plz.. do following changes..
1.Remove gem ‘cucumber-rails’ and add gem “cucumber-rails-training-wheels” instead in place of it
7. then run
rails generate cucumber_rails_training_wheels:install
and see those files of old cucumber have been included..
So finish your training with “cucumber-rails-training-wheels” then you should move to new cucumber. I am still searching what is new cucumber . as soon as i ll get i ll post in tips.
Still you can try from those following links