Sha256: 0df7c8310c9bed2996f8f36c182ecccc75c938cd7d79e73f5a2f8849683e0caa

Contents?: true

Size: 573 Bytes

Versions: 5

Compression:

Stored size: 573 Bytes

Contents

require 'spec_helper'
module Alf::Shell::Operator
  describe Autonum do

    let(:input){ [] }
    subject{ Autonum.run(argv) }

    before do
      subject.should be_a(Alf::Operator::NonRelational::Autonum)
      subject.operands.should eq([input])
    end

    context "with default attribute name" do
      let(:argv){ [input] }
      specify{
        subject.as.should eq(:autonum)
      }
    end

    context "with explicit attribute name" do
      let(:argv){ [input, "--", "unique"] }
      specify{
        subject.as.should eq(:unique)
      }
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
alf-0.12.2 spec/unit/alf-shell/operator/test_autonum.rb
alf-0.12.1 spec/unit/alf-shell/operator/test_autonum.rb
alf-0.12.0 spec/unit/alf-shell/operator/test_autonum.rb
alf-0.11.1 spec/unit/alf-shell/operator/test_autonum.rb
alf-0.11.0 spec/unit/alf-shell/operator/test_autonum.rb