Sha256: 86b2a0bf4c44013bb5eead816452b2e8f9402a550556a127888ac559b81d5a28

Contents?: true

Size: 739 Bytes

Versions: 8

Compression:

Stored size: 739 Bytes

Contents

require 'rubygems'
gem 'rspec', '~> 1.1'
gem 'sqlite3-ruby'

require 'ruby-debug'
require 'spec'

require File.join(File.dirname(__FILE__), '..', 'lib', 'record_filter')

module TestModel
  mattr_reader :extended_models
  @@extended_models = []

  attr_accessor :last_find

  def find(*args)
    @last_find = current_scoped_methods[:find] if current_scoped_methods
    super
  end

  def count(*args)
    @last_find = current_scoped_methods[:find] if current_scoped_methods
    super
  end

  def self.extended(base)
    @@extended_models << base
  end
end

require File.join(File.dirname(__FILE__), 'models')

ActiveRecord::Base.establish_connection(
  :adapter => 'sqlite3',
  :database => File.join(File.dirname(__FILE__), 'test.db')
)

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
aub-record_filter-0.2.0 spec/spec_helper.rb
aub-record_filter-0.6.0 spec/spec_helper.rb
aub-record_filter-0.8.0 spec/spec_helper.rb
aub-record_filter-0.9.0 spec/spec_helper.rb
aub-record_filter-0.9.1 spec/spec_helper.rb
outoftime-record_filter-0.2.0 spec/spec_helper.rb
outoftime-record_filter-0.6.0 spec/spec_helper.rb
outoftime-record_filter-0.8.0 spec/spec_helper.rb