Sha256: 7cf79db21a0ec1f90d6ab809020b19c4612d3b1a8695c6db3d20cf59033c35e7
Contents?: true
Size: 917 Bytes
Versions: 1
Compression:
Stored size: 917 Bytes
Contents
require 'type_check_helper' module Alf module Algebra describe Allbut, 'type_check' do subject{ op.type_check } context 'when ok' do let(:op){ allbut(suppliers, [:sid, :name]) } it{ should eq(op.heading) } end context 'when projectping unexisting attribute' do let(:op){ allbut(suppliers, [:sid, :unknown]) } it 'should raise an error' do lambda{ subject }.should raise_error(TypeCheckError, /no such attribute `unknown`/) end end context 'when projectping unexisting attributes' do let(:op){ allbut(suppliers, [:sid, :foo, :bar]) } it 'should raise an error' do lambda{ subject }.should raise_error(TypeCheckError, /no such attributes `foo`,`bar`/) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
alf-core-0.15.0 | spec/unit/alf-algebra/operator/allbut/test_type_check.rb |