metamaps--metamaps/spec/support/controller_helpers.rb
2017-11-25 11:18:32 -08:00

21 lines
451 B
Ruby

# frozen_string_literal: true
# https://github.com/plataformatec/devise/wiki/How-To:-Stub-authentication-in-controller-specs
require 'devise'
module ControllerHelpers
extend ActiveSupport::Concern
included do
include Devise::Test::ControllerHelpers
end
def comparable(model)
model.attributes.except('id', 'created_at', 'updated_at')
end
end
RSpec.configure do |config|
config.include ControllerHelpers, type: :controller
end