Sha256: 47e29c78a8fd03b8e75d4eeeea879dc7d321ee97c096c30f9314c52b3921359d
Contents?: true
Size: 489 Bytes
Versions: 14
Compression:
Stored size: 489 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Axiom::Types::Type, '.include?' do subject { object.include?(value) } let(:object) do Class.new(described_class) do constraint(->(object) { !object.nil? }) end end context 'when the value matches the type constraint' do let(:value) { Object.new } it { should be(true) } end context 'when the value does not match the type constraint' do let(:value) { nil } it { should be(false) } end end
Version data entries
14 entries across 12 versions & 4 rubygems