Sha256: 3000fd7f47bfaddd4e79260b2d1349f1d30294d4c1347bf37ed563509d79d55f

Contents?: true

Size: 677 Bytes

Versions: 5

Compression:

Stored size: 677 Bytes

Contents

require 'spec_helper'

describe Octogate::ConfigLoader do
  describe ".load_config" do
    before do
      Octogate.config.token = nil
      Octogate.config.targets = {}
    end

    subject { Octogate::ConfigLoader.load_config(config_file) }

    it "evaluate config on ConfigLoader instance binding" do
      from_token = Octogate.config.token
      from_targets = Octogate.config.targets

      expect(from_token).to be_nil
      expect(from_targets).to eq({})

      subject

      expect(Octogate.config.token).to eq("token")
      expect(Octogate.config.targets).to have(7).item
      expect(Octogate.config.targets["jenkins"]).to be_a Octogate::Target
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
octogate-0.4.0 spec/lib/octogate/config_loader_spec.rb
octogate-0.3.0 spec/lib/octogate/config_loader_spec.rb
octogate-0.2.2 spec/lib/octogate/config_loader_spec.rb
octogate-0.2.1 spec/lib/octogate/config_loader_spec.rb
octogate-0.2.0 spec/lib/octogate/config_loader_spec.rb