Sha256: 83fd6e07cb9d9d8dc08a6c3f97d89bf4160be4f729066b1795f54a01185145ad

Contents?: true

Size: 680 Bytes

Versions: 7

Compression:

Stored size: 680 Bytes

Contents

require 'spec_helper'
module Alf
  module Shell
    describe Main, "-I" do

      before do
        Path.dir.chdir
        subject
      end

      let(:cmd){ Main.new }

      subject{
        cmd.parse_options(argv)
        cmd
      }

      context 'when no explicitly set' do
        let(:argv){ [] }

        it 'should have defaults only' do
          cmd.config.load_paths.should eq(["a_load_path"])
        end
      end

      context 'when specified multiple times' do
        let(:argv){ ["-Ilib", "-Ispec"] }

        it 'should have defaults only' do
          cmd.config.load_paths.should eq(["a_load_path", "lib", "spec"])
        end
      end

    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
alf-shell-0.16.4 spec/unit/main/test_I_option.rb
alf-shell-0.16.3 spec/unit/main/test_I_option.rb
alf-shell-0.16.2 spec/unit/main/test_I_option.rb
alf-shell-0.16.1 spec/unit/main/test_I_option.rb
alf-shell-0.16.0 spec/unit/main/test_I_option.rb
alf-shell-0.15.0 spec/unit/main/test_I_option.rb
alf-shell-0.14.0 spec/unit/main/test_I_option.rb