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.15.0-java spec/bson/config_spec.rb
bson-4.15.0 spec/bson/config_spec.rb
bson-4.14.1-java spec/bson/config_spec.rb
bson-4.14.1 spec/bson/config_spec.rb
bson-4.14.0-java spec/bson/config_spec.rb
bson-4.14.0 spec/bson/config_spec.rb
bson-4.13.0-java spec/bson/config_spec.rb
bson-4.13.0 spec/bson/config_spec.rb
tdiary-5.1.6 vendor/bundle/ruby/2.7.0/gems/bson-4.12.0/spec/bson/config_spec.rb
bson-4.12.1-java spec/bson/config_spec.rb
bson-4.12.1 spec/bson/config_spec.rb
bson-4.12.0-java spec/bson/config_spec.rb
bson-4.12.0 spec/bson/config_spec.rb
bson-4.11.1-java spec/bson/config_spec.rb
bson-4.11.1 spec/bson/config_spec.rb
bson-4.11.0-java spec/bson/config_spec.rb
bson-4.11.0 spec/bson/config_spec.rb
bson-4.10.1-java spec/bson/config_spec.rb
bson-4.10.1 spec/bson/config_spec.rb
bson-4.9.5-java spec/bson/config_spec.rb