Sha256: 01979a70cc528693110f47d1bef4a72fc7cbd5ef33504e0b843d210026bfdc7a

Contents?: true

Size: 432 Bytes

Versions: 15

Compression:

Stored size: 432 Bytes

Contents

require "strong_json"

describe StrongJSON::Type do
  let(:schema) { StrongJSON::Type::Literal.new(3) }

  describe "===" do
    it "tests by =~ and returns true" do
      expect(
        case 3
        when schema
          true
        end
      ).to be_truthy
    end

    it "tests by =~ and returns false" do
      expect(
        case true
        when schema
          true
        end
      ).to be_falsey
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
strong_json-2.1.2 spec/case_subsumption_operator_spec.rb
strong_json-2.1.1 spec/case_subsumption_operator_spec.rb
strong_json-2.1.0 spec/case_subsumption_operator_spec.rb
strong_json-2.0.0 spec/case_subsumption_operator_spec.rb
strong_json-1.1.0 spec/case_subsumption_operator_spec.rb
strong_json-1.0.1 spec/case_subsumption_operator_spec.rb
strong_json-1.0.0 spec/case_subsumption_operator_spec.rb
strong_json-0.9.0 spec/case_subsumption_operator_spec.rb
strong_json-0.8.0 spec/case_subsumption_operator_spec.rb
strong_json-0.7.1 spec/case_subsumption_operator_spec.rb
strong_json-0.7.0 spec/case_subsumption_operator_spec.rb
strong_json-0.6.0 spec/case_subsumption_operator_spec.rb
strong_json-0.5.0 spec/case_subsumption_operator_spec.rb
strong_json-0.4.0 spec/case_subsumption_operator_spec.rb
strong_json-0.3.0 spec/case_subsumption_operator_spec.rb