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 Write Our First Tests

$ 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:inblock 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:inload_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:inrun' 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

You'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.

You need an end for every do. When you see the error expecting keyword_end; suspect that you've missed one out!

Thank you so much!

Hey, no problem! :smile: :+1:

Hi 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.

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 # <-- add this
end

Thank you!