Sha256: a88c1d42c1fa747da66a87062de94ef23e0d820e2d4cd7cf11a31cee2b8121c2

Contents?: true

Size: 613 Bytes

Versions: 5

Compression:

Stored size: 613 Bytes

Contents

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

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

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

    context "a typical config" do
      let(:argv){ [input] + ["--", "a", "--", "time", "--", "time_sum", "sum{ time }"] }
      specify{
        subject.by.should eq(Alf::AttrList[:a])
        subject.order.should eq(Alf::Ordering[[:time, :asc]])
        subject.summarization.should eq(Alf::Summarization[:time_sum => "sum{ time }"])
      }
    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_quota.rb
alf-0.12.1 spec/unit/alf-shell/operator/test_quota.rb
alf-0.12.0 spec/unit/alf-shell/operator/test_quota.rb
alf-0.11.1 spec/unit/alf-shell/operator/test_quota.rb
alf-0.11.0 spec/unit/alf-shell/operator/test_quota.rb