Sha256: 7db1babcb3f50f57051e21b5ce8e61403c46a04b347a501764703d76bdb1aac2
Contents?: true
Size: 779 Bytes
Versions: 19
Compression:
Stored size: 779 Bytes
Contents
require 'spec_helper' module Finitio describe RelationType, "include?" do let(:heading){ Heading.new([Attribute.new(:a, intType)]) } let(:type){ RelationType.new(heading) } subject{ type.include?(arg) } context 'when a empty set' do let(:arg){ Set.new } it{ should eq(true) } end context 'when a valid, non empty set' do let(:arg){ Set.new } before do arg << {a: 12} << {a: 15} end it{ should eq(true) } end context 'when not a set' do let(:arg){ "foo" } it{ should eq(false) } end context 'when a set containing invalid tuples' do let(:arg){ Set.new } before do arg << {a: 12.0} end it{ should eq(false) } end end end
Version data entries
19 entries across 19 versions & 1 rubygems