Sha256: ccee5ca4286df6acba0784d414cff4ced45ed5a3ecd777bcb5409094f4470fa3

Contents?: true

Size: 290 Bytes

Versions: 19

Compression:

Stored size: 290 Bytes

Contents

RSpec.shared_context 'predicate helper' do
  def p(name, *args)
    Dry::Logic::Rule::Predicate.new(predicates[name], args: args).to_ast
  end

  let!(:predicates) do
    Module.new {
      include Dry::Logic::Predicates

      def self.email?(value)
        true
      end
    }
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

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