Sha256: dd3b46338b149e4400bd7449f91278aa519ee6bc96b7d5831e0ea1dedbaca922

Contents?: true

Size: 418 Bytes

Versions: 19

Compression:

Stored size: 418 Bytes

Contents

RSpec.describe 'Building schemas' do
  describe 'Dry::Validation.Schema' do
    it 'builds a schema class with custom predicate set' do
      predicates = Module.new do
        include Dry::Logic::Predicates

        def zomg?(*)
          true
        end
      end

      schema = Dry::Validation.Schema(predicates: predicates, build: false)

      expect(schema.predicates[:key?]).to be_a(Method)
    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
dry-validation-0.13.3 spec/integration/schema_builders_spec.rb
dry-validation-0.13.2 spec/integration/schema_builders_spec.rb
dry-validation-0.13.1 spec/integration/schema_builders_spec.rb
dry-validation-0.11.2 spec/integration/schema_builders_spec.rb
dry-validation-0.12.3 spec/integration/schema_builders_spec.rb
dry-validation-0.13.0 spec/integration/schema_builders_spec.rb
dry-validation-0.12.2 spec/integration/schema_builders_spec.rb
dry-validation-0.12.1 spec/integration/schema_builders_spec.rb
dry-validation-0.12.0 spec/integration/schema_builders_spec.rb
dry-validation-0.11.1 spec/integration/schema_builders_spec.rb
dry-validation-0.11.0 spec/integration/schema_builders_spec.rb
dry-validation-0.10.7 spec/integration/schema_builders_spec.rb
dry-validation-0.10.6 spec/integration/schema_builders_spec.rb
dry-validation-0.10.5 spec/integration/schema_builders_spec.rb
dry-validation-0.10.4 spec/integration/schema_builders_spec.rb
dry-validation-0.10.3 spec/integration/schema_builders_spec.rb
dry-validation-0.10.2 spec/integration/schema_builders_spec.rb
dry-validation-0.10.1 spec/integration/schema_builders_spec.rb
dry-validation-0.10.0 spec/integration/schema_builders_spec.rb