Sha256: 52dff44f00561b6aeffbeab02db2a642f7cde556b437fe2dbccb0ec6d56161fb

Contents?: true

Size: 966 Bytes

Versions: 22

Compression:

Stored size: 966 Bytes

Contents

module SharedUserWithoutEmail
  extend ActiveSupport::Concern

  included do
    # NOTE: This is missing :validatable and :confirmable, as they both require
    # an email field at the moment. It is also missing :omniauthable because that
    # adds unnecessary complexity to the setup
    devise :database_authenticatable, :lockable, :recoverable,
           :registerable, :rememberable, :timeoutable,
           :trackable
  end

  # This test stub is a bit rubbish because it's tied very closely to the
  # implementation where we care about this one case. However, completely
  # removing the email field breaks "recoverable" tests completely, so we are
  # just taking the approach here that "email" is something that is a not an
  # ActiveRecord field.
  def email_changed?
    raise NoMethodError
  end

  def respond_to?(method_name, include_all=false)
    return false if method_name.to_sym == :email_changed?
    super(method_name, include_all)
  end
end

Version data entries

22 entries across 22 versions & 4 rubygems

Version Path
devise-4.3.0 test/rails_app/lib/shared_user_without_email.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/devise-4.2.1/test/rails_app/lib/shared_user_without_email.rb
devise-4.2.1 test/rails_app/lib/shared_user_without_email.rb
devise_openid_authenticatable-1.3.0 rails/lib/shared_user_without_email.rb
devise-4.2.0 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.10 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.3 test/rails_app/lib/shared_user_without_email.rb
devise-4.1.1 test/rails_app/lib/shared_user_without_email.rb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/devise-4.1.0/test/rails_app/lib/shared_user_without_email.rb
devise-4.1.0 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.9 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.2 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.1 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.8 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.7 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.0 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.0.rc2 test/rails_app/lib/shared_user_without_email.rb
devise-4.0.0.rc1 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.6 test/rails_app/lib/shared_user_without_email.rb
devise-3.5.5 test/rails_app/lib/shared_user_without_email.rb