Skip to content

Commit 006db3a

Browse files
committed
fix test failure
1 parent d841bcf commit 006db3a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

spec/node_query/node_rules/parser_spec.rb

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,16 @@ def initialize(id, name)
193193
},
194194
adapter: adapter
195195
)
196+
197+
expected_error_message = if RUBY_VERSION >= '3.4.0'
198+
'{type: "sym"} is not supported'
199+
else
200+
'{:type=>"sym"} is not supported'
201+
end
202+
196203
expect {
197204
rules.query_nodes(node)
198-
}.to raise_error(NodeQuery::MethodNotSupported, '{:type=>"sym"} is not supported')
205+
}.to raise_error(NodeQuery::MethodNotSupported, expected_error_message)
199206
end
200207

201208
it 'sets option including_self to false' do

0 commit comments

Comments
 (0)