Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Creating Methods in Tests

Hello , followed the code as per the video but when i run get failures https://github.com/neilp666/odotv1

Neils-MacBook-Pro-2:odot1 neilpatel$ rspec spec/features/todo_lists/create_spec.rb Warning: you should require 'minitest/autorun' instead. Warning: or add 'gem "minitest"' before 'require "minitest/autorun"' From: /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inblock in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in load_dependency' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inrequire' /usr/local/rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/test/unit/assertions.rb:1:in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inrequire' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in block in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:inload_dependency' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-rails-2.13.1/lib/rspec/rails/adapters.rb:3:in<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inblock in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:in load_dependency' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inrequire' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-rails-2.13.1/lib/rspec/rails.rb:11:in <top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:inrequire' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in block in require' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:232:inload_dependency' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.1.7/lib/active_support/dependencies.rb:247:in require' /Users/neilpatel/Desktop/Rails/odot1/spec/spec_helper.rb:4:in<top (required)>' /Users/neilpatel/Desktop/Rails/odot1/spec/features/todo_lists/create_spec.rb:1:in require' /Users/neilpatel/Desktop/Rails/odot1/spec/features/todo_lists/create_spec.rb:1:in<top (required)>' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in load' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:inblock in load_spec_files' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:in each' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/configuration.rb:819:inload_spec_files' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/command_line.rb:22:in run' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:80:inrun' /usr/local/rvm/gems/ruby-2.0.0-p247/gems/rspec-core-2.13.1/lib/rspec/core/runner.rb:17:in `block in autorun' FFFF

Failures:

1) Creating todo lists displays an error when the todo list has a title less than 3 characters Failure/Error: expect(page).to have_content("New Todo_list") expected to find text "New Todo_list" in "New todo_list Title Description Back" # ./spec/features/todo_lists/create_spec.rb:10:in create_todo_list' # ./spec/features/todo_lists/create_spec.rb:35:inblock (2 levels) in <top (required)>'

2) Creating todo lists redirects to the todo list index page on success Failure/Error: expect(page).to have_content("New Todo_list") expected to find text "New Todo_list" in "New todo_list Title Description Back" # ./spec/features/todo_lists/create_spec.rb:10:in create_todo_list' # ./spec/features/todo_lists/create_spec.rb:19:inblock (2 levels) in <top (required)>'

3) Creating todo lists displays an error when the todo list has no title Failure/Error: expect(page).to have_content("New Todo_list") expected to find text "New Todo_list" in "New todo_list Title Description Back" # ./spec/features/todo_lists/create_spec.rb:10:in create_todo_list' # ./spec/features/todo_lists/create_spec.rb:26:inblock (2 levels) in <top (required)>'

4) Creating todo lists displays an error when the todo list has a no description Failure/Error: expect(page).to have_content("New Todo_list") expected to find text "New Todo_list" in "New todo_list Title Description Back" # ./spec/features/todo_lists/create_spec.rb:10:in create_todo_list' # ./spec/features/todo_lists/create_spec.rb:47:inblock (2 levels) in <top (required)>'

Finished in 1.06 seconds 4 examples, 4 failures

Failed examples:

rspec ./spec/features/todo_lists/create_spec.rb:32 # Creating todo lists displays an error when the todo list has a title less than 3 characters rspec ./spec/features/todo_lists/create_spec.rb:17 # Creating todo lists redirects to the todo list index page on success rspec ./spec/features/todo_lists/create_spec.rb:23 # Creating todo lists displays an error when the todo list has no title rspec ./spec/features/todo_lists/create_spec.rb:44 # Creating todo lists displays an error when the todo list has a no description

1 Answer

Adam Sommer
Adam Sommer
62,470 Points

Looks like you're missing a gem form this line:

Warning: or add 'gem "minitest"'

Might try adding:

gem 'minitest'

To your Gemfile and retrying the test.