Sha256: c7d8be49dc1f4eb3a1aa036a57c88a75c28908b6bf2c5c28a3e91e893779ec69

Contents?: true

Size: 766 Bytes

Versions: 5

Compression:

Stored size: 766 Bytes

Contents

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

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

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

    context "--no-allbut" do
      let(:argv){ [input, "--", "time", "b", "--", "as"] }
      specify{
        subject.attributes.should eq(Alf::AttrList[:time, :b])
        subject.as.should eq(:as)
        subject.allbut.should eq(false)
      }
    end

    context "--allbut" do
      let(:argv){ [input, "--allbut", "--","a", "--", "as"] }
      specify{
        subject.attributes.should eq(Alf::AttrList[:a])
        subject.as.should eq(:as)
        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_group.rb
alf-0.12.1 spec/unit/alf-shell/operator/test_group.rb
alf-0.12.0 spec/unit/alf-shell/operator/test_group.rb
alf-0.11.1 spec/unit/alf-shell/operator/test_group.rb
alf-0.11.0 spec/unit/alf-shell/operator/test_group.rb