@@ -215,7 +215,7 @@ def filter_with_context(users, context:)
215215 expect { subject . yell ( "admin" ) }
216216 . to be_authorized_to ( :yell? , target ) . with ( TestService ::CustomPolicy )
217217 . with_context ( able_to_yell : false )
218- end . to raise_error ( RSpec ::Expectations ::ExpectationNotMetError , %r{and context.+: able_to_yell=> true} )
218+ end . to raise_error ( RSpec ::Expectations ::ExpectationNotMetError , %r{and context.+able_to_yell(=>|: ) true} )
219219 end
220220 end
221221
@@ -353,7 +353,7 @@ def filter_with_context(users, context:)
353353 end . to raise_error (
354354 RSpec ::Expectations ::ExpectationNotMetError ,
355355 Regexp . new ( "expected a scoping named :default for type :data " \
356- "with scope options {:with_admins=> false} " \
356+ "with scope options {:? with_admins(=>|: ) false} " \
357357 "from TestService::CustomPolicy to have been applied" )
358358 )
359359 end
@@ -366,7 +366,7 @@ def filter_with_context(users, context:)
366366 end . to raise_error (
367367 RSpec ::Expectations ::ExpectationNotMetError ,
368368 Regexp . new ( "expected a scoping named :default for type :data " \
369- "with scope options matching {:with_admins=> \\ (a falsey value\\ )} " \
369+ "with scope options matching {:? with_admins(=>|: ) \\ (a falsey value\\ )} " \
370370 "from TestService::CustomPolicy to have been applied" )
371371 )
372372 end
@@ -393,7 +393,7 @@ def filter_with_context(users, context:)
393393 end . to raise_error (
394394 RSpec ::Expectations ::ExpectationNotMetError ,
395395 Regexp . new ( "expected a scoping named :default for type :data without scope options " \
396- "and context {:all_users=> false} " \
396+ "and context {:? all_users(=>|: ) false} " \
397397 "from TestService::CustomPolicy to have been applied" )
398398 )
399399 end
0 commit comments