Sha256: b74a163bf55e677b7381eee55bcb42ed4be42bc0037b0c6abdee8d0a73677716
Contents?: true
Size: 1.02 KB
Versions: 4
Compression:
Stored size: 1.02 KB
Contents
require 'spec_helper' describe AjaxDatatablesRails do describe 'configurations' do context 'configurable from outside' do before(:each) do AjaxDatatablesRails.configure do |config| config.db_adapter = :mysql end end it 'should have custom value' do expect(AjaxDatatablesRails.config.db_adapter).to eq(:mysql) end end end end describe AjaxDatatablesRails::Configuration do let(:config) { AjaxDatatablesRails::Configuration.new } describe 'default config' do it 'default orm should :active_record' do expect(config.orm).to eq(:active_record) end it 'default db_adapter should :postgresql' do expect(config.db_adapter).to eq(:postgresql) end end describe 'custom config' do it 'should accept db_adapter custom value' do config.db_adapter = :mysql expect(config.db_adapter).to eq(:mysql) end it 'accepts a custom orm value' do config.orm = :mongoid expect(config.orm).to eq(:mongoid) end end end
Version data entries
4 entries across 4 versions & 1 rubygems