{"comment":{"created_at":"2011-10-24T08:48:53Z","body":"Getting this error when we run the test. \r\n\r\nCode snippets:\r\n\r\nSpec -\r\nresponse.should render_template(\r\n        :partial => 'partials/home/breakdowns/_role',\r\n        :layout => false\r\n        :locals => {:role_breakdown => :role_breakdown}\r\n    )\r\n\r\nController -\r\n`render :partial => 'partials/home/breakdowns/role', :locals=>{:role_breakdown=>@role_breakdown},:layout=>false`\r\n\r\nThis is using RSpec 2.6, (and it looks like the render_template matcher just delegates to assert_template). The error appears only when :locals is used, which leads me to believe that either @locals or actual_locals is nil. \r\n\r\nThe :layout also exposes the bug where expected_layout isn't defined, but that seems to be a known bug. \r\n","updated_at":"2011-10-24T08:48:53Z","url":"https://api.github.com/repos/rails/rails/issues/comments/2501095","id":2501095,"user":{"gravatar_id":"8e55051df3aefc2432fd5fac82919bd7","avatar_url":"https://secure.gravatar.com/avatar/8e55051df3aefc2432fd5fac82919bd7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/mjhasson","id":192015,"login":"mjhasson"}},"action":"created","issue":{"number":3415,"created_at":"2011-10-24T07:11:45Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"When using the :locals option it gives the following error:\r\n\r\nFailure/Error: response.should render_template(\r\n     NoMethodError:\r\n       You have a nil object when you didn't expect it!\r\n       You might have expected an instance of Array.\r\n       The error occurred while evaluating nil.[]\r\n\r\nhttps://github.com/rails/rails/blob/94a780356cd2ea6c7cb1ce75525596b28857870b/actionpack/lib/action_controller/test_case.rb#L91","comments":2,"title":"@locals seems to be Nil in assert_template","updated_at":"2011-10-24T08:48:53Z","url":"https://api.github.com/repos/rails/rails/issues/3415","id":2030976,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"8e55051df3aefc2432fd5fac82919bd7","avatar_url":"https://secure.gravatar.com/avatar/8e55051df3aefc2432fd5fac82919bd7?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/mjhasson","id":192015,"login":"mjhasson"},"html_url":"https://github.com/rails/rails/issues/3415","labels":[],"state":"open"},"legacy":{"issue_id":2030976,"comment_id":2501095}}