Sha256: b91e4c524ecceda11559ee1807bd8d468cd16d9a2785f94776818137cb91a972
Contents?: true
Size: 589 Bytes
Versions: 4
Compression:
Stored size: 589 Bytes
Contents
class MockRequest include HttpAcceptLanguage attr_accessor :env def initialize @env = {'HTTP_ACCEPT_LANGUAGE' => ''} end end class MockController include Rails::LocaleDetection attr_accessor :request, :params, :cookies, :default_url_options, :user def initialize(request) @request = request @cookies = ActionDispatch::Cookies::CookieJar.new @default_url_options = @params = {} end def user_locale return user.locale if user end end class MockUser attr_accessor :locale def initialize(locale) @locale = locale end end
Version data entries
4 entries across 4 versions & 1 rubygems