Sha256: d93733c9a52d5f48767176bc58d7663b8031adbdf4ebec9115691f51670bef49
Contents?: true
Size: 1.28 KB
Versions: 18
Compression:
Stored size: 1.28 KB
Contents
require "spec_helper" describe Mongoid::Config do after :all do config.raise_not_found_error = true end let(:config) { Mongoid::Config.instance } describe ".database=" do context "when object provided is not a Mongo::DB" do it "raises an error" do lambda { config.database = "Test" }.should raise_error end end end describe "#raise_not_found_error=" do context "when setting to true" do before do config.raise_not_found_error = true end it "sets the value" do config.raise_not_found_error.should == true end end context "when setting to false" do before do config.raise_not_found_error = false end it "sets the value" do config.raise_not_found_error.should == false end end end describe "#allow_dynamic_fields=" do context "when setting to true" do before do config.allow_dynamic_fields = true end it "sets the value" do config.allow_dynamic_fields.should == true end end context "when setting to false" do before do config.allow_dynamic_fields = false end it "sets the value" do config.allow_dynamic_fields.should == false end end end end
Version data entries
18 entries across 18 versions & 1 rubygems