Sha256: abc4935857525287f7769134835566111cdcb9af1eca9d35fedfbfe368e8fb1f

Contents?: true

Size: 446 Bytes

Versions: 3

Compression:

Stored size: 446 Bytes

Contents

require 'spec_helper'
module Alf
  describe Shell, ".from_argv(argv, Summarization)" do

    subject{ Shell.from_argv(argv, Summarization) }

    context "from an Array" do
      let(:argv){ ["s", "sum{ qty }", "m", "max{ size }"] }

      it{ should be_a(Summarization) }

      specify{
        subject.to_hash.keys.to_set.should eq([:s, :m].to_set)
        subject.to_hash.values.all?{|v| v.should be_a(Aggregator)}
      }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alf-shell-0.14.0 spec/unit/from_argv/test_to_summarization.rb
alf-shell-0.13.1 spec/unit/from_argv/test_to_summarization.rb
alf-shell-0.13.0 spec/unit/from_argv/test_to_summarization.rb