Sha256: d6e91b39644a2b2b4e0fba1d26e477e3f361a8ff7b19365a1f93e6a4f836f53f

Contents?: true

Size: 368 Bytes

Versions: 2

Compression:

Stored size: 368 Bytes

Contents

describe Mysql2QueryFilter::Plugin::Log do
  let(:client) { Mysql2::Client.new }
  let(:out) { StringIO.new }

  before do
    Mysql2QueryFilter.configure do |filter|
      filter.plugin :log, out: out
    end

    allow(client).to receive(:query_without_filter)
    client.query('select 1')
  end

  subject { out.string }
  it { is_expected.to eq "select 1\n" }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mysql2_query_filter-plugin-log-0.1.1 spec/mysql2_query_filter-plugin-log_spec.rb
mysql2_query_filter-plugin-log-0.1.0 spec/mysql2_query_filter-plugin-log_spec.rb