Sha256: b246172ecdc1b9b71a0831049e4ac1677de60486eaa17b649ea4da256086b036

Contents?: true

Size: 569 Bytes

Versions: 6

Compression:

Stored size: 569 Bytes

Contents

# frozen_string_literal: true

require "spec_helpers"

describe Wayfarer::Config::Ferrum do
  let(:env) { {} }
  subject(:ferrum) { Wayfarer::Config::Ferrum.new(env) }

  describe "#options" do
    context "by default" do
      it "is {}" do
        expect(ferrum.options).to eq({})
      end
    end

    context "with env var set" do
      before { env["WAYFARER_FERRUM_OPTIONS"] = "url:http://chrome:3000,headless:false" }

      it "parses the env var" do
        expect(ferrum.options).to eq(url: "http://chrome:3000", headless: false)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
wayfarer-0.4.6 spec/config/ferrum_spec.rb
wayfarer-0.4.5 spec/config/ferrum_spec.rb
wayfarer-0.4.4 spec/config/ferrum_spec.rb
wayfarer-0.4.3 spec/config/ferrum_spec.rb
wayfarer-0.4.2 spec/config/ferrum_spec.rb
wayfarer-0.4.1 spec/config/ferrum_spec.rb