@@ -354,15 +354,15 @@ class ::TestPost < ActiveRecord::Base
354354
355355 it "should explain query" do
356356 explain = TestPost . where ( id : 1 ) . explain
357- expect ( explain ) . to include ( "Cost" )
358- expect ( explain ) . to include ( "INDEX UNIQUE SCAN" )
357+ expect ( explain . inspect ) . to include ( "Cost" )
358+ expect ( explain . inspect ) . to include ( "INDEX UNIQUE SCAN" )
359359 end
360360
361361 it "should explain query with binds" do
362362 binds = [ ActiveRecord ::Relation ::QueryAttribute . new ( "id" , 1 , ActiveRecord ::Type ::OracleEnhanced ::Integer . new ) ]
363363 explain = TestPost . where ( id : binds ) . explain
364- expect ( explain ) . to include ( "Cost" )
365- expect ( explain ) . to include ( "INDEX UNIQUE SCAN" ) . or include ( "TABLE ACCESS FULL" )
364+ expect ( explain . inspect ) . to include ( "Cost" )
365+ expect ( explain . inspect ) . to include ( "INDEX UNIQUE SCAN" ) . or include ( "TABLE ACCESS FULL" )
366366 end
367367 end
368368
@@ -768,13 +768,13 @@ class ::TestPost < ActiveRecord::Base
768768 it "should explain considers hints" do
769769 post = TestPost . optimizer_hints ( "FULL (\" TEST_POSTS\" )" )
770770 post = post . where ( id : 1 )
771- expect ( post . explain ) . to include ( "| TABLE ACCESS FULL| TEST_POSTS |" )
771+ expect ( post . explain . inspect ) . to include ( "| TABLE ACCESS FULL| TEST_POSTS |" )
772772 end
773773
774774 it "should explain considers hints with /*+ */" do
775775 post = TestPost . optimizer_hints ( "/*+ FULL (\" TEST_POSTS\" ) */" )
776776 post = post . where ( id : 1 )
777- expect ( post . explain ) . to include ( "| TABLE ACCESS FULL| TEST_POSTS |" )
777+ expect ( post . explain . inspect ) . to include ( "| TABLE ACCESS FULL| TEST_POSTS |" )
778778 end
779779 end
780780
0 commit comments