Sha256: f2602976a8e2cdd620a0869935ae2597591138033c6be980c8c66ccdbf8e9ea2
Contents?: true
Size: 859 Bytes
Versions: 3
Compression:
Stored size: 859 Bytes
Contents
# frozen_string_literal: true shared_examples 'uses error_pages' do context do it do controller_file_test routes_file_test end def controller_file_test # rubocop:disable Metrics/AbcSize application_controller_file = content('app/controllers/application_controller.rb') expect(application_controller_file).to match('rescue_from Exception') expect(application_controller_file).to match('rescue_from ActiveRecord::RecordNotFound') expect(application_controller_file).to match('rescue_from ActionController::RoutingError') expect(application_controller_file).to match('server_error') expect(application_controller_file).to match('page_not_found') end def routes_file_test route_file = content('config/routes.rb') expect(route_file).to match('unmatched_route') end end end
Version data entries
3 entries across 3 versions & 1 rubygems