Sha256: 00caea47592a647b03a6da06b63802309d7196931e1aef9a025e5e834f632eab

Contents?: true

Size: 549 Bytes

Versions: 9

Compression:

Stored size: 549 Bytes

Contents

require 'spec_helper'
module Alf
  module Engine
    describe Autonum do

      it 'should work on an empty operand' do
        Autonum.new([], :autonum).to_a.should eq([])
      end

      it 'should work on a non empty operand' do
        rel = [
          {:name => "Jones"},
          {:name => "Smith"}
        ]
        exp = [
          {:name => "Jones", :autoname => 0},
          {:name => "Smith", :autoname => 1}
        ]
        Autonum.new(rel, :autoname).to_a.should eq(exp)
      end

    end
  end # module Engine
end # module Alf

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-engine/test_autonum.rb
alf-core-0.14.0 spec/unit/alf-engine/test_autonum.rb
alf-core-0.13.1 spec/unit/alf-engine/test_autonum.rb
alf-core-0.13.0 spec/unit/alf-engine/test_autonum.rb
alf-0.12.2 spec/unit/alf-engine/test_autonum.rb
alf-0.12.1 spec/unit/alf-engine/test_autonum.rb
alf-0.12.0 spec/unit/alf-engine/test_autonum.rb
alf-0.11.1 spec/unit/alf-engine/test_autonum.rb
alf-0.11.0 spec/unit/alf-engine/test_autonum.rb