Sha256: d112fd1a7bbbbace46264eeb00d8e3af26e197c3b778be0c473a750c53eb7aa1

Contents?: true

Size: 747 Bytes

Versions: 74

Compression:

Stored size: 747 Bytes

Contents

require "spec_helper"

describe BSON::Config do

  describe "#validating_keys?" do

    context "when the default is used" do

      it "returns false" do
        expect(described_class).to_not be_validating_keys
      end
    end

    context "when configuring to false" do

      before do
        BSON::Config.validating_keys = false
      end

      it "returns false" do
        expect(described_class).to_not be_validating_keys
      end
    end

    context "when configuring to true" do

      before do
        BSON::Config.validating_keys = true
      end

      after do
        BSON::Config.validating_keys = false
      end

      it "returns true" do
        expect(described_class).to be_validating_keys
      end
    end
  end
end

Version data entries

74 entries across 73 versions & 3 rubygems

Version Path
bson-4.9.5 spec/bson/config_spec.rb
bson-4.10.0-java spec/bson/config_spec.rb
bson-4.10.0 spec/bson/config_spec.rb
bson-4.9.4-java spec/bson/config_spec.rb
bson-4.9.4 spec/bson/config_spec.rb
bson-4.9.3-java spec/bson/config_spec.rb
bson-4.9.3 spec/bson/config_spec.rb
bson-4.9.2-java spec/bson/config_spec.rb
bson-4.9.2 spec/bson/config_spec.rb
bson-4.9.1-java spec/bson/config_spec.rb
bson-4.9.1 spec/bson/config_spec.rb
bson-4.9.0-java spec/bson/config_spec.rb
bson-4.9.0 spec/bson/config_spec.rb
bson-4.8.2-java spec/bson/config_spec.rb
bson-4.8.2 spec/bson/config_spec.rb
bson-4.8.1-java spec/bson/config_spec.rb
bson-4.8.1 spec/bson/config_spec.rb
bson-4.8.0-java spec/bson/config_spec.rb
bson-4.8.0 spec/bson/config_spec.rb
bson-4.7.1-java spec/bson/config_spec.rb