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

Charles-Eric Legras
Charles-Eric Legras
4,917 Points

Validation Trouble

when I run this command inside the terminal

bin/rspec spec/features/todo_lists/create_spec.rb

I have this error message:

/Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in load': /Users/Charlou/treehouse/projects/odot/spec/features/todo_lists/create_spec.rb:5: syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError) options[:title] ⎜⎜="My todo list" ^ /Users/Charlou/treehouse/projects/odot/spec/features/todo_lists/create_spec.rb:6: syntax error, unexpected tIDENTIFIER, expecting keyword_end options[:description] ⎜⎜= "This is my todo list." ^ from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inblock in load_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:in each' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/configuration.rb:1065:inload_spec_files' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/command_line.rb:18:in run' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:103:inrun' from /Library/Ruby/Gems/2.0.0/gems/rspec-core-2.99.2/lib/rspec/core/runner.rb:17:in `block in autorun'

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

Looks like this file

spec/features/todo_lists/create_spec.rb

Around line 6. Check for a missing "end". Notice that in the error message:

syntax error, unexpected tIDENTIFIER, expecting keyword_end (SyntaxError) options[:title] ⎜⎜="My todo list" ^ 

Notice it's somewhere around the options[:title]

Charles-Eric Legras
Charles-Eric Legras
4,917 Points

Thanks!! ;) Seems to work properly now