Sha256: c8f7a3d34266c3f75a7e5762e6de4675af866b080cb23837cbf81a8c0e41f13f
Contents?: true
Size: 777 Bytes
Versions: 12
Compression:
Stored size: 777 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 do class Foo include Kuhsaft::Searchable end 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 expect(ActiveRecord::Base.connection.instance_values).not_to eq('postgresql') SearchableDemo.should_receive :scope SearchableDemo.class_eval do include Kuhsaft::Searchable end end end end end
Version data entries
12 entries across 12 versions & 2 rubygems