Sha256: 2cb80a8172231958c6c9926c11474aa64d0af610d033708289e68aeae269de9d
Contents?: true
Size: 1.09 KB
Versions: 5
Compression:
Stored size: 1.09 KB
Contents
require 'spec_helper' module Alf module Operator describe Signature, "#collect_on" do subject{ op.class.signature.collect_on(op) } let(:operands) { subject[0] } let(:arguments) { subject[1] } let(:options) { subject[2] } describe "on a nullary op" do let(:op){ NonRelational::Generator.new([], 10, :id) } specify { subject.should eq([[], [10, :id], {}]) } end describe "on a monadic op, with one arg" do let(:op){ NonRelational::Autonum.new([:suppliers], :id) } it{ should eq([ [:suppliers], [:id], {} ]) } end describe "on a monadic op, with one arg and an option" do let(:op){ Relational::Project.new([:suppliers], [:name, :city], :allbut => true) } it{ should eq([[:suppliers], [AttrList[:name, :city]], {:allbut => true}]) } end describe "on a dyadic op" do let(:op){ Relational::Join.new([:suppliers, :cities]) } it{ should eq([[:suppliers, :cities], [], {}]) } end end end # module Operator end # module Alf
Version data entries
5 entries across 5 versions & 1 rubygems