Sha256: f93ac4d1447de26775650edb09bbb59a5bbc950f7145c8784807a22cfe62cb8c
Contents?: true
Size: 526 Bytes
Versions: 4
Compression:
Stored size: 526 Bytes
Contents
require 'spec_helper' require 'rom/sql/support/active_support_notifications' require 'active_support/log_subscriber' describe 'ActiveSupport::Notifications support' do include_context 'database setup' it 'works' do container.gateways[:default].use_logger(LOGGER) sql = nil ActiveSupport::Notifications.subscribe('sql.rom') do |*, payload| sql = payload[:sql] end query = %(SELECT * FROM "users" WHERE name = 'notification test') conn.run(query) expect(sql).to eql(query) end end
Version data entries
4 entries across 4 versions & 1 rubygems