Sha256: b538005eafe046448337b15348996380329e25643ad6e6b95713944cca6c7c7b

Contents?: true

Size: 372 Bytes

Versions: 5

Compression:

Stored size: 372 Bytes

Contents

require 'spec_helper'
module Domain
  describe Union, "predicate" do

    it 'returns a Proc' do
      Boolean.predicate.should be_a(Proc)
    end

    it 'is satisfied when a valid value' do
      Boolean.predicate.call(true).should be_true
    end

    it 'is not satisfied when an invalid value' do
      Boolean.predicate.call("12").should be_false
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
domain-1.0.0 spec/factory/union_domain/test_predicate.rb
domain-1.0.0.rc4 spec/factory/union_domain/test_predicate.rb
domain-1.0.0.rc3 spec/factory/union_domain/test_predicate.rb
domain-1.0.0.rc2 spec/factory/union_domain/test_predicate.rb
domain-1.0.0.rc1 spec/factory/union_domain/test_predicate.rb