Sha256: 29956d5e13ea1f89d7a477538f1fc636a8a1c5c5c6da398fdb88cf4a721b37a1
Contents?: true
Size: 913 Bytes
Versions: 17
Compression:
Stored size: 913 Bytes
Contents
require "spec_helper" describe Brightbox::BBConfig, "#section_names" do subject(:config) { config_from_contents(ini) } context "when no sections exist" do let(:ini) { "" } it { expect(config.section_names).to eql([]) } end context "when only a 'core' section exists" do let(:ini) do <<-EOS [core] setting = value EOS end it { expect(config.section_names).to eql([]) } end context "when only an 'alias' section exists" do let(:ini) do <<-EOS [alias] setting = value EOS end it { expect(config.section_names).to eql([]) } end context "when multiple sections exist" do let(:ini) do <<-EOS [core] setting = value [cli-12345] setting = value [app-12345] setting = value EOS end it { expect(config.section_names).to eq(%w[cli-12345 app-12345]) } end end
Version data entries
17 entries across 17 versions & 1 rubygems