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 trialjooyoonbyun
3,438 Points$ bin/rspec spec/features/todo_lists/create_spec.rb doesn't indicate any failures nor examples.
When I type that in terminal,
treehouse:~/projects/odot (master) $ bin/rspec spec/features/todo_lists/create_spec.rb
/home/treehouse/.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': /home/treehouse/projects/odot/spec/features/todo_lists/create_spec.rb:14: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
from /home/treehouse/.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 /home/treehouse/.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 /home/treehouse/.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 /home/treehouse/.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 /home/treehouse/.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 /home/treehouse/.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'
It doesn't indicate the number of failures nor examples. What is the problem?
Thank you.
2 Answers
Steve Hunter
57,712 PointsYou're missing an end
- add one before the last end
.
That should sort it.
Steve.
P.S. I'll add a comment in your code.
Steve Hunter
57,712 PointsHi Jooyoon,
You aren't seeing any test failures because the test isn't running due to a syntax error. Can you post your code, please? create_spec.rb
has an issue!
Steve.
jooyoonbyun
3,438 Pointsrequire '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 # <-- add this
end
Thank you!
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsYou need an
end
for everydo
. When you see the errorexpecting keyword_end
; suspect that you've missed one out!jooyoonbyun
3,438 Pointsjooyoonbyun
3,438 PointsThank you so much!
Steve Hunter
57,712 PointsSteve Hunter
57,712 PointsHey, no problem!