Sha256: 084498155a5ac131fb8fc6e1bd7f2c83b7746a816c17ace46980034ba18f36ce
Contents?: true
Size: 1.02 KB
Versions: 1
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 :pg (postgresql)" do expect(config.db_adapter).to eq(:pg) 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
datatables-net-0.4.0 | spec/ajax-datatables-rails/configuration_spec.rb |