Sha256: 72385b61e43ecaaf47f232ed1c8ddec3f76e5dcb83e301679da9d5dae2cf2de7

Contents?: true

Size: 242 Bytes

Versions: 7

Compression:

Stored size: 242 Bytes

Contents

shared_context 'predicate helper' do
  def p(name, *args)
    predicates[name].curry(*args).to_ast
  end

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

      predicate(:email?) { |value| true }
    }
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
dry-validation-0.9.5 spec/shared/predicate_helper.rb
dry-validation-0.9.4 spec/shared/predicate_helper.rb
dry-validation-0.9.3 spec/shared/predicate_helper.rb
dry-validation-0.9.2 spec/shared/predicate_helper.rb
dry-validation-0.9.1 spec/shared/predicate_helper.rb
dry-validation-0.9.0 spec/shared/predicate_helper.rb
dry-validation-0.8.0 spec/shared/predicate_helper.rb