diff --git a/spec/ransack/adapters/active_record/base_spec.rb b/spec/ransack/adapters/active_record/base_spec.rb index 89bb9444..a9a567f3 100644 --- a/spec/ransack/adapters/active_record/base_spec.rb +++ b/spec/ransack/adapters/active_record/base_spec.rb @@ -254,10 +254,10 @@ module ActiveRecord ) expect(s.term_cont).to eq 'atlo' expect(s.name_or_email_cont).to eq 'different' - expect(s.result.to_sql).to include('"people"."name" LIKE \'%different%\'') - expect(s.result.to_sql).to include('"people"."email" LIKE \'%different%\'') - expect(s.result.to_sql).to include('"people"."name" LIKE \'%atlo%\'') - expect(s.result.to_sql).to include('"people"."email" LIKE \'%atlo%\'') + expect(s.result.to_sql).to include(/("|`)people("|`)\.("|`)name("|`) I?LIKE '%different%'/i) + expect(s.result.to_sql).to include(/("|`)people("|`)\.("|`)email("|`) I?LIKE '%different%'/i) + expect(s.result.to_sql).to include(/("|`)people("|`)\.("|`)name("|`) I?LIKE '%atlo%'/i) + expect(s.result.to_sql).to include(/("|`)people("|`)\.("|`)email("|`) I?LIKE '%atlo%'/i) end it 'also works with associations' do