See: https://github.com/thoughtbot/clearance/blob/3e9529a643cff20beb9bb49eacedb90dee49d465/lib/clearance/testing/controller_helpers.rb

March 31, 2017 ยท View on GitHub

class ClearanceAuth < DerailedBenchmarks::AuthHelper def setup require 'clearance/session' @user = User.first # Change to fit your needs end

def call(env) env[:clearance] = Clearance::Session.new(env) env[:clearance].sign_in(@user) app.call(env) end end

DerailedBenchmarks.auth = ClearanceAuth.new