Sha256: 6eed690c2bcbe4b7c5657e567f24d517faf04b5549532370000d4fff50a5d2bc

Contents?: true

Size: 520 Bytes

Versions: 4

Compression:

Stored size: 520 Bytes

Contents

require 'spec_helper'
module Alf
  module Algebra
    describe Signature, '.initialize' do

      subject{
        Signature.new(nil){|s|
          s.argument :name, AttrName, :autonum
          s.option :allbut, Boolean, true, "Applies an allbut projection?"
        }        
      }

      it "yields the signature" do
        subject.arguments.should eql([[:name, AttrName, :autonum, nil]])
        subject.options.should eql([[:allbut, Boolean, true, "Applies an allbut projection?"]])
      end

    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-algebra/support/signature/test_initialize.rb
alf-core-0.14.0 spec/unit/alf-algebra/support/signature/test_initialize.rb
alf-core-0.13.1 spec/unit/alf-algebra/support/signature/test_initialize.rb
alf-core-0.13.0 spec/unit/alf-algebra/support/signature/test_initialize.rb