Sha256: 53604701a05efdc09457bd7e96f17ed0bed1f69f10f3158b1e4bc9356a56db61

Contents?: true

Size: 446 Bytes

Versions: 2

Compression:

Stored size: 446 Bytes

Contents

require 'sqlite3_ar_regexp'

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

    class NobelPrizeWinner < ActiveRecord::Base
    end
  end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sqlite3_ar_regexp-2.2.0 spec/regexp_spec.rb
sqlite3_ar_regexp-2.1.0 spec/regexp_spec.rb