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 trialDelaine Wendling
3,710 PointsError when trying to run bin/rspec
I am receiving the error message below when I run the line bin/rspec spec/features/todo_lists/create_spec.rb
RS-011:odot dwendling$ bin/rspec spec/features/todo_lists/create_spec.rb
/Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in load': /Users/dwendling/treehouse/projects/odot/spec/features/todo_lists/create_spec.rb:10: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '(' (SyntaxError)
fill_in "Title", with "My todo list"
^
/Users/dwendling/treehouse/projects/odot/spec/features/todo_lists/create_spec.rb:11: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
fill_in "Description", with "This is what I'm doing today."
^
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1361:in
block in load_spec_files'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in each'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/configuration.rb:1359:in
load_spec_files'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:102:in setup'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:88:in
run'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:73:in run'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/lib/rspec/core/runner.rb:41:in
invoke'
from /Users/dwendling/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.4.1/exe/rspec:4:in <top (required)>'
from bin/rspec:16:in
load'
from bin/rspec:16:in `<main>'
RS-011:odot dwendling$
These are the contents of my create_spec.rb file
require 'spec_helper'
describe "Creating todo lists" do it "redirects to the todo list index page on success" do visit "/todo_lists" click_link "New Todo list" expect(page).to have_content("New todo_list")
fill_in "Title", with "My todo list"
fill_in "Description", with "This is what I'm doing today."
click_button "Create Todo list"
expect(page).to have_content("My todo list")
end
end
1 Answer
Seth Reece
32,867 PointsHi Delaine,
It looks like you are missing a colon at the end of with. e.g.
fill_in "Title", with: "My todo list"
fill_in "Description", with: "This is what I'm doing today."