Sha256: 9f5360b82ce7ae03a9a4a8147135ec7fdf4eb393e1d7938a07cd048fe0ebde14

Contents?: true

Size: 605 Bytes

Versions: 3

Compression:

Stored size: 605 Bytes

Contents

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

    let(:input){ suppliers }
    subject{ Clip.run(argv) }

    before do
      subject.should be_a(Alf::Algebra::Clip)
      subject.attributes.should eq(Alf::AttrList[:a, :b])
      subject.operands.should eq([input])
    end

    context "--no-allbut" do
      let(:argv){ [input, "--", "a", "b"] }
      specify{
        subject.allbut.should be_false
      }
    end

    context "--allbut" do
      let(:argv){ [input, "--allbut", "--", "a", "b"] }
      specify{
        subject.allbut.should be_true
      }
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
alf-shell-0.14.0 spec/unit/operator/test_clip.rb
alf-shell-0.13.1 spec/unit/operator/test_clip.rb
alf-shell-0.13.0 spec/unit/operator/test_clip.rb