From 6ca3f4760bc077f8630ac26c60ea571049e6f7a0 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 4 Sep 2026 11:39:20 +0000 Subject: [PATCH] Assert render_ember_app pages emit a single HTML document `render_ember_app` emits the application's complete HTML document, so the rendering action must disable its layout, or the document ends up nested inside the layout's ``. The dummy application already renders without a layout (`HighVoltage.layout = false`), but nothing asserted it: a misconfiguration would produce invalid, nested documents while every example still passes. Assert that the pages rendered through `render_ember_app` contain exactly one doctype and `` element, and none of the layout's markup. Co-Authored-By: Claude Fable 5 --- spec/features/user_views_ember_app_spec.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/spec/features/user_views_ember_app_spec.rb b/spec/features/user_views_ember_app_spec.rb index 72e2d520..e8eda2a1 100644 --- a/spec/features/user_views_ember_app_spec.rb +++ b/spec/features/user_views_ember_app_spec.rb @@ -35,6 +35,20 @@ end end + # `render_ember_app` emits the application's complete HTML document, so the + # rendering action must disable its layout — the dummy application uses + # `HighVoltage.layout = false` — or the document ends up nested inside the + # layout's ``. + scenario "renders a single, complete HTML document", js: false do + [include_index_path, include_index_head_and_body_path, default_path].each do |path| + visit path + + expect(page.html.scan(/Dummy") + end + end + scenario "is redirected with trailing slash", js: false do expect(include_index_path).to eq("/no-block")