module BillingErrorRescuer extend ActiveSupport::Concern included do rescue_from Billing::LimitExceeded, with: :rescue_billing_limits def rescue_billing_limits render status: 402, json: Billing::PlanPresenter.new(@account).to_json end end end require 'spec_helper' describe BillingErrorRescuer, type: :controller do controller do include BillingErrorRescuer def action @account = FactoryBot.create :a