Sha256: a5f90310d0e65746dd66eb72cecd88344909f652cdf21e6f2312274d94826a1b
Contents?: true
Size: 770 Bytes
Versions: 21
Compression:
Stored size: 770 Bytes
Contents
require 'spec_helper' describe Kuhsaft::Searchable do context 'with missing includes' do it 'raises exteption when class does not include Kuhsaft::Bricklist' do expect { class Foo include Kuhsaft::Searchable end }.to raise_error(/needs Kuhsaft::BrickList to be included/) end end context 'with Bricklist included' do class SearchableDemo < ActiveRecord::Base include Kuhsaft::BrickList end context 'without postgresql' do it 'initializes scope' do ActiveRecord::Base.connection.instance_values.should_not == 'postgresql' SearchableDemo.should_receive :scope SearchableDemo.class_eval do include Kuhsaft::Searchable end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems