Sha256: a6e2eb5798eced98b5a18244a7c7c4b090079bb89488ab9be30e13bb4cf47c9b
Contents?: true
Size: 1.55 KB
Versions: 3
Compression:
Stored size: 1.55 KB
Contents
# frozen_string_literal: true shared_examples 'uses devise' do context do it do gemfile_file = content('Gemfile') expect(gemfile_file).to match(/^gem 'devise'/) devise_initializers_test devise_route_file_test devise_model_file_test file_control_test end def devise_initializers_test initializers_devise = content('config/initializers/devise.rb') expect(initializers_devise).to match('mailer') expect(initializers_devise).to match('mailer_sender') filter_parameter_logging = content('config/initializers/filter_parameter_logging.rb') expect(filter_parameter_logging).to match(':password') expect(filter_parameter_logging).to match(':password_confirmation') end def devise_route_file_test devise_route = content('config/routes.rb') expect(devise_route).to match('devise_for :users') end def devise_model_file_test # rubocop:disable Metrics/AbcSize devise_model_file = content('app/models/user.rb') expect(devise_model_file).to match(':database_authenticatable') expect(devise_model_file).to match(':registerable') expect(devise_model_file).to match(':recoverable') expect(devise_model_file).to match(':rememberable') expect(devise_model_file).to match(':trackable') expect(devise_model_file).to match(':validatable') end def file_control_test expect(File).to exist(file_project_path('config/locales/devise.en.yml')) expect(File).to exist(file_project_path('config/locales/devise.tr.yml')) end end end
Version data entries
3 entries across 3 versions & 1 rubygems