{"action":"created","issue":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/1532","labels_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1532/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1532/comments","events_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1532/events","html_url":"https://github.com/rspec/rspec-rails/issues/1532","id":128640054,"number":1532,"title":"Undefined Method `cache` in Tests for Rails 4.2.5.1","user":{"login":"todd","id":120350,"avatar_url":"https://avatars.githubusercontent.com/u/120350?v=3","gravatar_id":"","url":"https://api.github.com/users/todd","html_url":"https://github.com/todd","followers_url":"https://api.github.com/users/todd/followers","following_url":"https://api.github.com/users/todd/following{/other_user}","gists_url":"https://api.github.com/users/todd/gists{/gist_id}","starred_url":"https://api.github.com/users/todd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/todd/subscriptions","organizations_url":"https://api.github.com/users/todd/orgs","repos_url":"https://api.github.com/users/todd/repos","events_url":"https://api.github.com/users/todd/events{/privacy}","received_events_url":"https://api.github.com/users/todd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-25T21:15:45Z","updated_at":"2016-01-25T21:24:33Z","closed_at":null,"body":"Re: https://github.com/rails/rails/issues/23244\r\n\r\nWe're running rspec-rails 3.3.3. After updating to Rails 4.2.5.1, we started seeing failures in our tests when calling our method for manually rendering 404 pages. It appears that everything works fine when running the app and accessing that code path in the browser.\r\n\r\nHere's a full trace for the failure:\r\n```\r\n5) RedirectsController#redirect_region without valid region ID responds with a 404\r\n     Failure/Error: subject { get :redirect_region, params }\r\n     NoMethodError:\r\n       undefined method `cache' for nil:NilClass\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/template/resolver.rb:151:in `cached'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/template/resolver.rb:121:in `find_all_anywhere'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:68:in `block (2 levels) in _find_all'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:66:in `each'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:66:in `block in _find_all'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:65:in `each'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:65:in `_find_all'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/path_set.rb:50:in `find_file'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/lookup_context.rb:126:in `find_file'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/abstract_renderer.rb:18:in `find_file'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/template_renderer.rb:32:in `block in determine_template'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/lookup_context.rb:147:in `with_fallbacks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/abstract_renderer.rb:18:in `with_fallbacks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/template_renderer.rb:32:in `determine_template'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/template_renderer.rb:8:in `render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/renderer.rb:42:in `render_template'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/renderer/renderer.rb:23:in `render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:100:in `_render_template'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/streaming.rb:217:in `_render_template'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:83:in `render_to_body'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:32:in `render_to_body'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/renderers.rb:37:in `render_to_body'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/abstract_controller/rendering.rb:25:in `render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:16:in `render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:44:in `block (2 levels) in render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/core_ext/benchmark.rb:12:in `block in ms'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/2.2.0/benchmark.rb:303:in `realtime'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/core_ext/benchmark.rb:12:in `ms'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:44:in `block in render'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:87:in `cleanup_view_runtime'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:43:in `render'\r\n     # ./app/controllers/application_controller.rb:32:in `render_404'\r\n     # ./app/controllers/redirects_controller.rb:37:in `redirect_region'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/implicit_render.rb:4:in `send_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:198:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/rendering.rb:10:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:20:in `block in process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:117:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:555:in `block (2 levels) in compile'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:505:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:92:in `__run_callbacks__'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:778:in `_run_process_action_callbacks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/callbacks.rb:81:in `run_callbacks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/abstract_controller/callbacks.rb:19:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/rescue.rb:29:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:32:in `block in process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/instrumentation.rb:30:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/metal/params_wrapper.rb:250:in `process_action'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/abstract_controller/base.rb:137:in `process'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionview-4.2.5.1/lib/action_view/rendering.rb:30:in `process'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/test_case.rb:639:in `process'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/test_case.rb:67:in `process'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/actionpack-4.2.5.1/lib/action_controller/test_case.rb:514:in `get'\r\n     # ./spec/controllers/redirects_controller_spec.rb:45:in `block (3 levels) in <top (required)>'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:295:in `block (2 levels) in let'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:157:in `block (3 levels) in fetch_or_store'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:157:in `fetch'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:157:in `block (2 levels) in fetch_or_store'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/reentrant_mutex.rb:22:in `synchronize'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:156:in `block in fetch_or_store'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:155:in `fetch'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:155:in `fetch_or_store'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/memoized_helpers.rb:295:in `block in let'\r\n     # ./spec/controllers/redirects_controller_spec.rb:61:in `block (4 levels) in <top (required)>'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:206:in `instance_exec'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:206:in `block in run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:430:in `block in with_around_and_singleton_context_hooks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:388:in `block in with_around_example_hooks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:478:in `block in run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:618:in `block in run_around_example_hooks_for'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-rails-3.3.3/lib/rspec/rails/example/controller_example_group.rb:190:in `block (2 levels) in <module:ControllerExampleGroup>'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:378:in `instance_exec'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:378:in `instance_exec'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:389:in `execute_with'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:620:in `block (2 levels) in run_around_example_hooks_for'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-rails-3.3.3/lib/rspec/rails/adapters.rb:127:in `block (2 levels) in <module:MinitestLifecycleAdapter>'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:378:in `instance_exec'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:378:in `instance_exec'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:389:in `execute_with'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:620:in `block (2 levels) in run_around_example_hooks_for'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:273:in `call'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:621:in `run_around_example_hooks_for'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/hooks.rb:478:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:388:in `with_around_example_hooks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:430:in `with_around_and_singleton_context_hooks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example.rb:203:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:559:in `block in run_examples'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:555:in `map'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:555:in `run_examples'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:521:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `block in run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `map'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `block in run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `map'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/example_group.rb:522:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:115:in `block (3 levels) in run_specs'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:115:in `map'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:115:in `block (2 levels) in run_specs'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/configuration.rb:1627:in `with_suite_hooks'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:114:in `block in run_specs'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/reporter.rb:77:in `report'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:113:in `run_specs'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:89:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:73:in `run'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/lib/rspec/core/runner.rb:41:in `invoke'\r\n     # /usr/local/rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/rspec-core-3.3.2/exe/rspec:4:in `<top (required)>'\r\n     # /usr/local/rbenv/versions/2.2.3/bin/rspec:23:in `load'\r\n     # /usr/local/rbenv/versions/2.2.3/bin/rspec:23:in `<main>'\r\n```\r\n\r\nAnd here's the code in question:\r\n```ruby\r\nFOUR_OH_FOUR_PATH = 'public/404.html'.freeze\r\n\r\ndef render_404\r\n  render status: :not_found, file: FOUR_OH_FOUR_PATH, layout: false\r\nend\r\n```\r\n\r\ncc @jcoyne since you opened a similar issue on rails/rails."},"comment":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/comments/174669206","html_url":"https://github.com/rspec/rspec-rails/issues/1532#issuecomment-174669206","issue_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1532","id":174669206,"user":{"login":"jaredhales","id":326635,"avatar_url":"https://avatars.githubusercontent.com/u/326635?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredhales","html_url":"https://github.com/jaredhales","followers_url":"https://api.github.com/users/jaredhales/followers","following_url":"https://api.github.com/users/jaredhales/following{/other_user}","gists_url":"https://api.github.com/users/jaredhales/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredhales/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredhales/subscriptions","organizations_url":"https://api.github.com/users/jaredhales/orgs","repos_url":"https://api.github.com/users/jaredhales/repos","events_url":"https://api.github.com/users/jaredhales/events{/privacy}","received_events_url":"https://api.github.com/users/jaredhales/received_events","type":"User","site_admin":false},"created_at":"2016-01-25T21:24:33Z","updated_at":"2016-01-25T21:24:33Z","body":"I just ran into the same error. Seems that in my case at least I have a `RSpec::Rails::ViewRendering::EmptyTemplatePathSetDecorator` object and it doesn't have a `@cache` variable"}}