Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Editing Todo Lists

can't test both edit and create.rb now.

Last login: Fri Jan 30 17:26:23 on ttys000 MinYoungs-MacBook-Air:odot minyoungan$ bin/rspec /spec/features/todo_lists/creat_spec.rb /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load': cannot load such file -- /spec/features/todo_lists/creat_spec.rb (LoadError) from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inblock in load_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in each' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inload_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in run' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:inrun' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in block in autorun' MinYoungs-MacBook-Air:odot minyoungan$ bin/rspec /spec/features/todo_lists/edit_spec.rb /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inload': cannot load such file -- /spec/features/todo_lists/edit_spec.rb (LoadError) from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in block in load_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:ineach' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:inrun' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:in run' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:inblock in autorun' MinYoungs-MacBook-Air:odot minyoungan$ bin/rspec /Users/minyoungan/treehouse/projects/odot/spec/features/todo_lists/edit_spec.rb F

Failures:

1) Editing todo lists updates a todo list successfully with correct information Failure/Error: todo_list = TodoList.creat(title: "Groceries", description:"Grocery List.") NoMethodError: undefined method creat' for #<Class:0x007f8e3ac0e048> # ./spec/features/todo_lists/edit_spec.rb:5:inblock (2 levels) in <top (required)>'

Finished in 0.00411 seconds 1 example, 1 failure

Failed examples:

rspec ./spec/features/todo_lists/edit_spec.rb:4 # Editing todo lists updates a todo list successfully with correct information

Randomized with seed 53747

MinYoungs-MacBook-Air:odot minyoungan$

I am not sure what's the problem.

Does anybody know what is wrong?

Thank you in advance.

1 Answer

Clayton Perszyk
MOD
Clayton Perszyk
Treehouse Moderator 46,860 Points

Find this line in your edit_spec.rb file: todo_list = TodoList.creat(title: "Groceries", description:"Grocery List."); You're calling creat not create. Also, your create_spec.rb file has the same misspelling.

Thank you. But the problem still exists..

MinYoungs-MacBook-Air:odot minyoungan$ bin/rspec /spec/features/todo_lists/edit_spec.rb /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load': cannot load such file -- /spec/features/todo_lists/edit_spec.rb (LoadError) from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inblock in load_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in each' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inload_spec_files' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in run' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:inrun' from /Users/minyoungan/.rbenv/versions/2.0.0-p353/lib/ruby/gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun' MinYoungs-MacBook-Air:odot minyoungan$