Sha256: 28f062ecb8531836cb2ea04d6d31ae03fc98913efc663de89f38312c0aa804d2

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# frozen-string-literal: true
ENV["RAILS_ENV"] = "test"
require "minitest/autorun"
require "minitest/pride"
require "securerandom"
require "encrypted_form_fields"

EncryptedFormFields.secret_key_base = SecureRandom.hex
EncryptedFormFields.secret_token = SecureRandom.hex

class MockController
  attr_accessor :request

  def initialize(params = {})
    @params = params
  end

  def params
    ActionController::Parameters.new(@params)
  end
end

if ActiveSupport::TestCase.respond_to?(:test_order=)
  ActiveSupport::TestCase.test_order = :random
end

MockController.send(:include, EncryptedFormFields::EncryptedParameters)

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
encrypted_form_fields-1.0.0 test/test_helper.rb
encrypted_form_fields-0.2.4 test/test_helper.rb
encrypted_form_fields-0.2.3 test/test_helper.rb