g7ac6q
Last Updated: February 25, 2016
·
3.96K
· ducknorris

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):

Picture