Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

Layla Wu
Layla Wu
260 Points

Updates for Rails 4.2.3

I'm following the "Build a Todo List App" tutorial using Rails 4.2.3. I had trouble getting my Rspec to work properly. After some fiddling and googling, I did the following changes to my files to get the Rspec to work:

  • put my "web-console" gem in development mode only: gem 'web-console', group: :development
  • in my gem file, I updated my "rspec-rails" to 3.4 and higher: gem 'rspec-rails', '~>3.4'
  • again in gem file, updated "capybara" to 2.4 and higher: gem 'capybara', '~>2.4' used
  • "bundle exec rspec spec/features/todo_lists/create_spec.rb" to run rspec. or "bundle exec rspec" to run all examples

Hope this will be helpful to people who use the same version Rails.

Joshua "TechDev" Walker
Joshua "TechDev" Walker
6,823 Points

Layla Wu I just wanted to say thank you!

I had a few things extra I had to do, due to my Ruby being out of date but this helped me fix everything!

I got stuck on testing too and wasnt sure what I was doing wrong lol