Sha256: 318c84bd60e215a7097edc854d548c0dc6fcb91c9db60ab9798f1a315e4fc146
Contents?: true
Size: 447 Bytes
Versions: 7
Compression:
Stored size: 447 Bytes
Contents
require 'dry/logic/predicates' RSpec.describe Predicates do it 'can be included in another module' do mod = Module.new { include Predicates } expect(mod[:key?]).to be_a(Method) end describe '.predicate' do it 'defines a predicate method' do mod = Module.new { include Predicates predicate(:test?) do |foo| true end } expect(mod.test?('arg')).to be(true) end end end
Version data entries
7 entries across 7 versions & 1 rubygems