Sha256: 3b5f96077d40cf367c33280c7ba7d18fee1d3ce8207b52ae31aadbaebcbd18cf
Contents?: true
Size: 539 Bytes
Versions: 5
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true RSpec.shared_examples_for "a 404 page" do before do allow(Rails.application).to \ receive(:env_config).with(no_args).and_wrap_original do |m, *| m.call.merge( "action_dispatch.show_exceptions" => true, "action_dispatch.show_detailed_exceptions" => false ) end visit target_path end it "leads to a 404" do expect(page).to have_content("The page you're looking for can't be found") expect(page).to have_http_status(:not_found) end end
Version data entries
5 entries across 5 versions & 1 rubygems