From 047c89dbd5bfb79832264e5479987d1cfbd69d85 Mon Sep 17 00:00:00 2001 From: tgaff Date: Fri, 11 Aug 2023 07:45:39 +0900 Subject: [PATCH] Docs: Add `html_safe` example to testing->slots section (#1815) * Add `html_safe` example to testing doc slots section Ran into an issue where a tested component was rendering the passed slot as plain text. Thought a doc example with `html_safe` might help others with testing. * Update CHANGELOG.md --- docs/CHANGELOG.md | 4 ++++ docs/guide/testing.md | 1 + 2 files changed, 5 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 9d9305b462..9b5139051a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -18,6 +18,10 @@ nav_order: 5 *Cameron Dutro* +* Minor testing documentation improvement. + + *Travis Gaff* + ## 3.5.0 * Add Skroutz to users list. diff --git a/docs/guide/testing.md b/docs/guide/testing.md index 291c5dc919..ddcce5815d 100644 --- a/docs/guide/testing.md +++ b/docs/guide/testing.md @@ -33,6 +33,7 @@ def test_render_component component = ListComponent.new(title: "Fruits").tap do |c| c.with_item { "Apple" } c.with_item { "Orange" } + c.with_extra { "
rendered html
".html_safe } end render_inline(component)