How can I stub a controller helper method in a view spec with RSpec 3.4?
问题 I'm testing a view with RSpec (3.4 on Rails 4.2.5). And I use the decent_exposure gem in my CRUD controller. decent_exposure makes it easy to define named methods that are made available to my views and which memoize the resultant values. But I don't understand how I can stub these methods in a view spec. I tried do it according to the RSpec documentation, but it raises an error. Why doesn't it work? How can I stub the method article in the view? My controller class Account: