Sha256: c583312e90f85397737ede1cdc416d90760340b1d312ffa7c4fcf6c95c25e35c

Contents?: true

Size: 715 Bytes

Versions: 13

Compression:

Stored size: 715 Bytes

Contents

require_relative '../spec_helper'

describe Cranium::CommandLineOptions do

  let(:argv) {
    %w[
      --cranium-initializer my_initializer
      --cranium-load my_load
      --some-param some_value
      --another-param another_value
    ]
  }


  subject { Cranium::CommandLineOptions.new argv }

  describe "#cranium_arguments" do

    it "should return only arguments used by Cranium" do
      expect(subject.cranium_arguments).to eq(initializer: "my_initializer", load: "my_load")
    end

  end


  describe "#load_arguments" do
    it "should return non-cranium arguments" do
      expect(subject.load_arguments).to eq(:"some-param" => "some_value", :"another-param" => "another_value")
    end
  end

end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cranium-0.8.1 spec/cranium/command_line_options_spec.rb
cranium-0.8 spec/cranium/command_line_options_spec.rb
cranium-0.7 spec/cranium/command_line_options_spec.rb
cranium-0.6.1 spec/cranium/command_line_options_spec.rb
cranium-0.5 spec/cranium/command_line_options_spec.rb
cranium-0.4.3 spec/cranium/command_line_options_spec.rb
cranium-0.4.2 spec/cranium/command_line_options_spec.rb
cranium-0.4.1 spec/cranium/command_line_options_spec.rb
cranium-0.4 spec/cranium/command_line_options_spec.rb
cranium-0.3.1 spec/cranium/command_line_options_spec.rb
cranium-0.3.0 spec/cranium/command_line_options_spec.rb
cranium-0.2.1 spec/cranium/command_line_options_spec.rb
cranium-0.2.0 spec/cranium/command_line_options_spec.rb