How to test private methods with RSpec
Created an anonymous subclass of ApplicationController.
Then expose the protected / private method that you wanna test as public methods.
You can go and test them directly now.
Example bellow (from Rails w/ Devise):
Written by Catalin Ilinca
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#