title: " unexpected end-of-input, expecting keyword_end (SyntaxError)" RSpec 3, Rails 4.1.6, Ruby 2.0
body: <p>I am trying to spec out a <code>Users</code> controller, using <strong>RSpec 3.1.7</strong>, and I keep getting the <code>unexpected end-of-input SyntaxError</code>. I ended up "stripping" the entire controller to the first <code>describe</code>, just to see which line is causing the issue, like so:</p>
  
  <pre><code>require 'rails_helper'
  
  RSpec.describe UsersController, :type =&gt; :controller do
  
  end
  </code></pre>
  
  <p>Here is the exact error: </p>
  
  <pre><code>[my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require': [my app path]/app/controllers/users_controller.rb:20: syntax error, unexpected end-of-input, expecting keyword_end (SyntaxError)
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `block in require'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:232:in `load_dependency'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:247:in `require'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:348:in `require_or_load'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:480:in `load_missing_constant'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/activesupport-4.1.6/lib/active_support/dependencies.rb:180:in `const_missing'
   from [my app path]/spec/controllers/users_controller_spec.rb:3:in `&lt;top (required)&gt;'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `block in load_spec_files'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `each'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/configuration.rb:1105:in `load_spec_files'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:96:in `setup'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:84:in `run'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:69:in `run'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/lib/rspec/core/runner.rb:37:in `invoke'
   from [my ruby path]lib/ruby/gems/2.0.0/gems/rspec-core-3.1.7/exe/rspec:4:in `&lt;top (required)&gt;'
   from [my ruby path]bin/rspec:23:in `load'
   from [my ruby path]bin/rspec:23:in `&lt;main&gt;'
  </code></pre>
  
  <p>Here is my <code>rails_helper.rb</code>: </p>
  
  <pre><code>ENV["RAILS_ENV"] ||= 'test'
  require 'spec_helper'
  require File.expand_path("../../config/environment", __FILE__)
  require 'rspec/rails'
  require 'capybara/rails'
  require 'ffaker'
  
  ActiveRecord::Migration.maintain_test_schema!
  
  RSpec.configure do |config|
    # Factory_Girl Init
    config.include FactoryGirl::Syntax::Methods
  
    config.fixture_path = "#{::Rails.root}/spec/fixtures"
    config.use_transactional_fixtures = false
    config.infer_spec_type_from_file_location!
  
    # DatabaseClener config
    config.before(:suite) do
      DatabaseCleaner.clean_with(:truncation)
    end
  
    config.before(:each) do
      DatabaseCleaner.strategy = :transaction
    end
  
    config.before(:each, :js =&gt; true) do
      DatabaseCleaner.strategy = :truncation
    end
  
    config.before(:each) do
      DatabaseCleaner.start
    end
  
    config.after(:each) do
      DatabaseCleaner.clean
    end
  end
  </code></pre>
  
  <p>and here is my 'spec_helper.rb'</p>
  
  <pre><code>RSpec.configure do |config|
  
    config.expect_with :rspec do |expectations|
      expectations.include_chain_clauses_in_custom_matcher_descriptions = true
    end
  
    config.mock_with :rspec do |mocks|
      mocks.verify_partial_doubles = true
    end
  end 
  </code></pre>
  
  <p>I'm running:</p>
  
  <ul>
  <li>Ruby 2.0 </li>
  <li>Rails 4.1.6</li>
  <li>RSpec 3</li>
  </ul>