From c03f7fd642bf6e2f96a405784ce26e8132328bfc Mon Sep 17 00:00:00 2001 From: Geremia Taglialatela Date: Mon, 1 Jan 2024 12:17:09 +0100 Subject: [PATCH] Expect space when regexp has an escaped space Not 100% sure that this is the correct solution, but according to jaynetics/js_regex@ba77cc4 and the constant `LITERAL_REQUIRING_ESCAPE_PATTERN`, it appears that space does not need the escape pattern Close #927 --- test/action_view/cases/test_form_for_helpers.rb | 2 +- test/action_view/cases/test_form_with_helpers.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/action_view/cases/test_form_for_helpers.rb b/test/action_view/cases/test_form_for_helpers.rb index 1f811377..a26236b1 100644 --- a/test/action_view/cases/test_form_for_helpers.rb +++ b/test/action_view/cases/test_form_for_helpers.rb @@ -662,7 +662,7 @@ def test_field_with_format_space end def test_field_with_format_escaped_space - assert_field_with_format_has_source(:escaped_space, '\\ ') + assert_field_with_format_has_source(:escaped_space, ' ') end def test_field_with_format_ascii_escape diff --git a/test/action_view/cases/test_form_with_helpers.rb b/test/action_view/cases/test_form_with_helpers.rb index c0a4b703..9a367c03 100644 --- a/test/action_view/cases/test_form_with_helpers.rb +++ b/test/action_view/cases/test_form_with_helpers.rb @@ -661,7 +661,7 @@ def test_form_with_field_with_format_space end def test_form_with_field_with_format_escaped_space - assert_field_with_format_has_source(:escaped_space, '\\ ') + assert_field_with_format_has_source(:escaped_space, ' ') end def test_form_with_field_with_format_ascii_escape