test/components/forms/checkbox_test.rb in express_templates-0.11.19 vs test/components/forms/checkbox_test.rb in express_templates-0.11.20.rc1

- old
+ new

@@ -24,12 +24,12 @@ checkbox :eula } } label = '<label for="account_eula"' field = 'input type="checkbox" value="1" name="account\[eula\]"' - assert_match /#{label}/, html - assert_match /#{field}/, html + assert_match(/#{label}/, html) + assert_match(/#{field}/, html) label_idx = html.index(label) field_idx = html.index(field.gsub('\\', '')) assert (field_idx > label_idx), "label must come first" end @@ -39,11 +39,11 @@ checkbox :eula, label_after: true } } label = '<label for="account_eula"' field = 'input type="checkbox" value="1" name="account\[eula\]"' - assert_match /#{label}/, html - assert_match /#{field}/, html + assert_match(/#{label}/, html) + assert_match(/#{field}/, html) label_idx = html.index(label) field_idx = html.index(field.gsub('\\', '')) assert (field_idx < label_idx), "label must come after when label_after: true" end