Sha256: 0de899b6d17eca12f67d8216a6092f98eb4236fae39b33bdbf526a089bff2d5b

Contents?: true

Size: 465 Bytes

Versions: 5

Compression:

Stored size: 465 Bytes

Contents

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

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

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

    context "a typical coercion" do
      let(:argv){ [input] + %w{-- a Integer b Float} }
      specify{
        subject.heading.should eq(Alf::Heading[:a => Integer, :b => Float])
      }
    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_coerce.rb
alf-0.12.1 spec/unit/alf-shell/operator/test_coerce.rb
alf-0.12.0 spec/unit/alf-shell/operator/test_coerce.rb
alf-0.11.1 spec/unit/alf-shell/operator/test_coerce.rb
alf-0.11.0 spec/unit/alf-shell/operator/test_coerce.rb