Railscast #155 Cucumber Tutorial Substitutions part A

I've had trouble finding a good cucumber tutorial that isn't out of date. In fact I haven't found one, so I worked through the first half of the Railscast #155 which is an outdated Cucumber Tutorial, which if you can get over the outdated part is very well done. I would love it if someone posted an updated cucumber tutorial.
Below I've listed the substitutions necessary to follow the first half of the screen-cast.
So follow the on screen instructions unless I have a substitution listed, and these substitutions should allow you to finish the first half.

rails blog rails new blog

instead of setting up our test gems in test.rb
add this to Gemfile instead

group :test do
    gem 'rspec', ">=1.2.2"
    gem 'rspec-rails', ">=1.2.2"
    gem 'capybara' # replaced webrat
    gem 'cucumber-rails' #replaced cucumber
    gem 'cucumber-rails-training-wheels' #is needed to generate web_steps.rb

    #web_steps.rb replaced webrat_steps.rb
    gem 'database_cleaner' # I don't know why you need this one but I had an error that told me I needed it so I added it.
end


sudo rake gems:install RAILS_ENV=test bundle install
script/generate cucumber rails generate cucumber:install
#as well as the line below to generate web_steps.rb
rails generate cucumber_rails_training_wheels:install
rails generate rspec:install #I don't know if you need
cucumber features -n #including the -n results in an error, including features isn't necessary as features is the default location.
script/generate rspec_model article title:string content:text
rails generate model article title:string content:text

in the routes file with rails >3.0 you don't need map
map.resources :articles

 I think this should get you through the first half of the tutorial, The second half I'm still working on... ...if I I ever finish I'll be sure to post them up.

No comments:

Post a Comment