Sha256: 76370c65bdde945da808db1a3c27f718df75272d24242547b1378646a3864a99

Contents?: true

Size: 388 Bytes

Versions: 4

Compression:

Stored size: 388 Bytes

Contents

require 'spec_helper'
module Alf
  describe TupleComputation, "to_attr_list" do

    it 'should return the correct list of attribute names' do
      list = TupleComputation[
        :big? => lambda{ status > 20 },
        :who  => lambda{ "#{first} #{last}" }
      ].to_attr_list
      list.should be_a(AttrList)
      list.to_a.to_set.should eq([:big?, :who].to_set)
    end

  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-types/tuple_computation/test_to_attr_list.rb
alf-core-0.14.0 spec/unit/alf-types/tuple_computation/test_to_attr_list.rb
alf-core-0.13.1 spec/unit/alf-types/tuple_computation/test_to_attr_list.rb
alf-core-0.13.0 spec/unit/alf-types/tuple_computation/test_to_attr_list.rb