Sha256: 5e7fcaa50ddad3786909dde38957625042e3a4d8945bb258a2f24d1a960e78c8

Contents?: true

Size: 706 Bytes

Versions: 205

Compression:

Stored size: 706 Bytes

Contents

require "spec_helper"

module Beaker
  module Options
    describe OptionsFileParser do

      let(:parser) {Beaker::Options::OptionsFileParser}
      let(:simple_opts) {File.join(File.expand_path(File.dirname(__FILE__)), "data", "opts.txt")}

      it "can correctly read options from a file" do
        FakeFS.deactivate!
        expect(parser.parse_options_file(simple_opts)).to be === {:debug=>true, :tests=>"test.rb", :pre_suite=>["pre-suite.rb"], :post_suite=>"post_suite1.rb,post_suite2.rb"}
      end

      it "raises an error on no file found" do
        FakeFS.deactivate!
        expect{parser.parse_options_file("not a valid path")}.to raise_error(ArgumentError)
      end


    end
  end
end

Version data entries

205 entries across 205 versions & 1 rubygems

Version Path
beaker-4.38.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.38.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.37.2 spec/beaker/options/options_file_parser_spec.rb
beaker-4.37.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.37.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.36.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.36.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.35.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.34.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.33.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.32.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.31.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.30.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.29.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.29.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.28.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.28.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.27.1 spec/beaker/options/options_file_parser_spec.rb
beaker-4.27.0 spec/beaker/options/options_file_parser_spec.rb
beaker-4.26.0 spec/beaker/options/options_file_parser_spec.rb