@@ -354,15 +354,15 @@ class ::TestPost < ActiveRecord::Base
354
354
355
355
it "should explain query" do
356
356
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" )
359
359
end
360
360
361
361
it "should explain query with binds" do
362
362
binds = [ ActiveRecord ::Relation ::QueryAttribute . new ( "id" , 1 , ActiveRecord ::Type ::OracleEnhanced ::Integer . new ) ]
363
363
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" )
366
366
end
367
367
end
368
368
@@ -768,13 +768,13 @@ class ::TestPost < ActiveRecord::Base
768
768
it "should explain considers hints" do
769
769
post = TestPost . optimizer_hints ( "FULL (\" TEST_POSTS\" )" )
770
770
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 |" )
772
772
end
773
773
774
774
it "should explain considers hints with /*+ */" do
775
775
post = TestPost . optimizer_hints ( "/*+ FULL (\" TEST_POSTS\" ) */" )
776
776
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 |" )
778
778
end
779
779
end
780
780
0 commit comments