Sha256: c0b17093cccffea4e2165652eddcdace576c1d3b150392b589f54e9578d9397b

Contents?: true

Size: 441 Bytes

Versions: 11

Compression:

Stored size: 441 Bytes

Contents

require 'spec_helper'

describe Dandelion::Config do
  let(:yaml) do
    <<-YAML
      foo: bar
      baz: <%= ENV['BAZ'] %>
    YAML
  end

  before(:each) do
    ENV['BAZ'] = 'qux'
    expect(IO).to receive(:read).with('foo').and_return(yaml)
  end

  let(:config) { Dandelion::Config.new(path: 'foo') }

  it 'parses YAML' do
    expect(config[:foo]).to eq 'bar'
  end

  it 'parses ERB' do
    expect(config[:baz]).to eq 'qux'
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
dandelion-0.6.0 spec/dandelion/config_spec.rb
dandelion-0.5.4 spec/dandelion/config_spec.rb
dandelion-0.5.3 spec/dandelion/config_spec.rb
dandelion-0.5.2 spec/dandelion/config_spec.rb
dandelion-0.5.1 spec/dandelion/config_spec.rb
dandelion-0.5.0 spec/dandelion/config_spec.rb
dandelion-0.4.17 spec/dandelion/config_spec.rb
dandelion-0.4.16 spec/dandelion/config_spec.rb
dandelion-0.4.15 spec/dandelion/config_spec.rb
dandelion-0.4.14 spec/dandelion/config_spec.rb
dandelion-0.4.10 spec/dandelion/config_spec.rb