Sha256: 4447f1078e24036783cdf7762077fb0709119ab65dbf52eebb966dac4ce9750b

Contents?: true

Size: 669 Bytes

Versions: 4

Compression:

Stored size: 669 Bytes

Contents

require "spec_helper"

require "config_hound"

describe ConfigHound, "formats" do

  def load(path)
    ConfigHound.load(path)
  end

  given_resource "config.yml", %{
    foo: 1
    bar: 2
  }

  it "loads YAML" do
    expect(load("config.yml")).to eq(
      "foo" => 1,
      "bar" => 2
    )
  end

  given_resource "config.json", %{
    {
      "foo": 1,
      "bar": 2
    }
  }

  it "loads JSON" do
    expect(load("config.json")).to eq(
      "foo" => 1,
      "bar" => 2
    )
  end

  given_resource "config.toml", %{
    foo = 1
    bar = 2
  }

  it "loads TOML" do
    expect(load("config.toml")).to eq(
      "foo" => 1,
      "bar" => 2
    )
  end

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
config_hound-1.4.1 spec/features/formats_spec.rb
config_hound-1.4.0 spec/features/formats_spec.rb
config_hound-1.3.2 spec/features/formats_spec.rb
config_hound-1.3.0 spec/features/formats_spec.rb