Sha256: c204616890d53cdefb1ad4c132698cc8cb02be656fcf441723435ea6420395be

Contents?: true

Size: 467 Bytes

Versions: 1

Compression:

Stored size: 467 Bytes

Contents

# frozen_string_literal: true

require 'sqlite3_ar_regexp'

describe 'SQLite3ARRegexp::Extension' do
  before(:all) do
    ActiveRecord::Base.establish_connection(
      adapter: 'sqlite3',
      database: 'spec/test.sqlite3'
    )

    NobelPrizeWinner = Class.new(ActiveRecord::Base)
  end

  it 'adds "REGEXP" support for ActiveRecord::ConnectionAdapters::SQLite3Adapter' do
    expect(NobelPrizeWinner.where('first_name REGEXP "al|ma"').count).to eql 3
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sqlite3_ar_regexp-3.0.0 spec/regexp_spec.rb