-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Description
I use assert_select_jquery to test my code and I debug the gem I get this pattern
77: patterns << argumentless_pattern unless jquery_opt
78:
79: matched_pattern = nil
80: patterns.each do |pattern|
81: debugger
=> 82: if response.body.match(Regexp.new(pattern))
83: matched_pattern = pattern
84: break
85: end
86: end
(byebug) pattern
"(?:jQuery|\\$)\\(['\"]#cart['\"]\\)\\.html\\(['\"]((\\\\\"|[^\"])*)['\"]\\);"
The pattern content the ; , So my code never pass the test.
$('#cart').html("<%=j render(@cart) %>")
If I add the ; to it , it can pass the test.
$('#cart').html("<%=j render(@cart) %>");
I think the ; in the pattern should be optional, right?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels