SherrySeibel/todo_list — pull request #2 by SherrySeibel (2014-10-05 21:26:17+00:00)
Title: Add sign in

@gabebw

I'm going through the Upcase TDD tutorial and I'm running into this error: ```
spec/rails_helper.rb:45:in `block in ': uninitialized constant Features (NameError)```

I've tried a couple of different things. I moved code out of rails_helper.rb to sign_in.rb:
```Ruby
module Features
def sign_in
visit root_path
end
end

RSpec.configure do |config|
config.include Features, type: :feature
end
```
While I no longer get a `NameError`, sign_in becomes an undefined local variable which is what the module was negating in the first place. I have since switched it back.

I think the problem originated in my Gemfile. I started the tutorial last week? When I started, the tutorial was using rails 3 and ruby 1.8. (I think). When the tutorial was updated, I went back and redid the work I started. The versions of rspec and capybara have been constantly changing throughout the course of this app. First to compensate for using rails 3, then i just used the latest versions. I switched them to their current state as a means to troubleshoot (the tutorial calls for rspec-rails 3.0.1 and capybara 2.3.0.

Here is the entire error:

```
/Users/Renee/.rubies/ruby-2.1.2/bin/ruby -I/Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib:/Users/Renee/.gem/ruby/2.1.2/gems/rspec-support-3.0.4/lib -S /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/exe/rspec ./spec/features/user_creates_new_todolist_spec.rb ./spec/features/view_homepage_spec.rb
/Users/Renee/TDD/todo_list/spec/rails_helper.rb:45:in `block in ': uninitialized constant Features (NameError)
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core.rb:79:in `configure'
from /Users/Renee/TDD/todo_list/spec/rails_helper.rb:27:in `'
from /Users/Renee/TDD/todo_list/spec/features/user_creates_new_todolist_spec.rb:1:in `require'
from /Users/Renee/TDD/todo_list/spec/features/user_creates_new_todolist_spec.rb:1:in `'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `block in load_spec_files'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `each'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/configuration.rb:1058:in `load_spec_files'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:97:in `setup'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:85:in `run'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:70:in `run'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/exe/rspec:4:in `

'
/Users/Renee/.rubies/ruby-2.1.2/bin/ruby -I/Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/lib:/Users/Renee/.gem/ruby/2.1.2/gems/rspec-support-3.0.4/lib -S /Users/Renee/.gem/ruby/2.1.2/gems/rspec-core-3.0.4/exe/rspec ./spec/features/user_creates_new_todolist_spec.rb ./spec/features/view_homepage_spec.rb failed
```

Any feedback would be helpful.