I have a controller and there is an action within that controller. That action contains only a few lines of code and this method doesn't have any routes, as follows:
class MyController < ApplicationController
def action_a # an action does have routes
..some code..
end
def action b #(an action without a route, just contains few logic)
..some code..
end
end
My question is what is a proper way to write rspec to test action_b
?
Any help would be appreciated.
action_b
should really be a private method. Normally, you would not test this directly, you would verify it implicitly by testingaction_a
.