Sha256: aa5352aa222ce33ecca9ea4974bacecc692c5a8d1d1928e6342c2e530c55a4cc

Contents?: true

Size: 764 Bytes

Versions: 5

Compression:

Stored size: 764 Bytes

Contents

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

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

    before do
      subject.should be_a(Alf::Operator::Relational::Summarize)
      subject.operands.should eq([input])
      subject.by.should eq(Alf::AttrList[:a])
      subject.summarization.should eq(Alf::Summarization[:time_sum => "sum{ time }"])
    end

    context "--no-allbut" do
      let(:argv){ [input] + ["--", "a", "--", "time_sum", "sum{ time }"] }
      specify{
        subject.allbut.should eq(false)
      }
    end

    context "--allbut" do
      let(:argv){ [input] + ["--allbut", "--", "a", "--", "time_sum", "sum{ time }"] }
      specify{
        subject.allbut.should eq(true)
      }
    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_summarize.rb
alf-0.12.1 spec/unit/alf-shell/operator/test_summarize.rb
alf-0.12.0 spec/unit/alf-shell/operator/test_summarize.rb
alf-0.11.1 spec/unit/alf-shell/operator/test_summarize.rb
alf-0.11.0 spec/unit/alf-shell/operator/test_summarize.rb