module Mixins
  module ControllerConstants
    # Session data size logging constants
    case Rails.env
    when "test"
      SESSION_LOG_THRESHOLD = 50.kilobytes
      SESSION_ELEMENT_THRESHOLD = 5.kilobytes
    when "development"
      SESSION_LOG_THRESHOLD = 50.kilobytes
      SESSION_ELEMENT_THRESHOLD = 5.kilobytes
    else
      SESSION_LOG_THRESHOLD = 100.kilobytes
      SESSION_ELEMENT_THRESHOLD = 10.kilobytes
    end
  end
end

module Mixins
  module ControllerConstants
    # Session data size logging constants
    case Rails.env
    when "test", "development"
      SESSION_LOG_THRESHOLD = 50.kilobytes
      SESSION_ELEMENT_THRESHOLD = 5.kilobytes
    else
      SESSION_LOG_THRESHOLD = 100.kilobytes
      SESSION_ELEMENT_THRESHOLD = 10.kilobytes
    end
  end
end

Refactor of defining SESSION constants
Refactor of defining SESSION constants

Both development and test share the same values, so the case statement
can be reduced a bit.
