{"action":"closed","issue":{"url":"https://api.github.com/repos/rspec/rspec-rails/issues/1525","labels_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1525/labels{/name}","comments_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1525/comments","events_url":"https://api.github.com/repos/rspec/rspec-rails/issues/1525/events","html_url":"https://github.com/rspec/rspec-rails/issues/1525","id":126107363,"number":1525,"title":"View tests don't include any helpers","user":{"login":"bronson","id":1776,"avatar_url":"https://avatars.githubusercontent.com/u/1776?v=3","gravatar_id":"","url":"https://api.github.com/users/bronson","html_url":"https://github.com/bronson","followers_url":"https://api.github.com/users/bronson/followers","following_url":"https://api.github.com/users/bronson/following{/other_user}","gists_url":"https://api.github.com/users/bronson/gists{/gist_id}","starred_url":"https://api.github.com/users/bronson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bronson/subscriptions","organizations_url":"https://api.github.com/users/bronson/orgs","repos_url":"https://api.github.com/users/bronson/repos","events_url":"https://api.github.com/users/bronson/events{/privacy}","received_events_url":"https://api.github.com/users/bronson/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2016-01-12T06:18:46Z","updated_at":"2016-02-02T15:03:07Z","closed_at":"2016-02-02T15:03:07Z","body":"With RSpec 3.4 / Rails 4.2, I needed to mock controller-defined helpers.\r\n\r\nNow, with RSpec master / Rails 5, it appears I need to mock *all* helpers, including built-ins (model_url, etc).\r\n\r\nIs this intentional?  #1076 makes it clear that leaving out Controller Helpers is intentional.  Not including any helpers at all, however, might a little extreme?\r\n\r\nFWIW, here are the changes I needed to make to my View spec:\r\n```diff\r\n describe 'search/print/_property.html.haml', type: :view do\r\n   it 'displays the page' do\r\n     property = build(:property)\r\n+\r\n+    # rails 5/rspec master doesn't include Helper classes and built-ins (Rails 4.2/rspec 3.4 did)\r\n+    view.class_eval('include ApplicationHelper')\r\n+    view.class_eval('include SearchHelper')\r\n+    # even the built-in helpers!\r\n+    allow(view).to receive(:property_path).and_return(\"/property/#{property.property_id}\")\r\n+\r\n+    # rpsec intentially wants us to stub all controller-defined helpers\r\n     # https://github.com/rspec/rspec-rails/issues/1076#issuecomment-59842447\r\n     allow(view).to receive(:search_params).and_return(Search::Params.new({}))\r\n     allow(view).to receive(:client_state).and_return(Search::Params.new({}))\r\n+\r\n     render 'search/print/property', property: property\r\n     assert_select \":match('href', ?)\", \"/property/#{property.property_id}\"\r\n   end\r\n```"}}