Sha256: 360ec3872282a6042e9acea2c7c252b09a82b92d23dec869d8bb4662b12e40fa

Contents?: true

Size: 436 Bytes

Versions: 6

Compression:

Stored size: 436 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'
    IO.should_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

6 entries across 6 versions & 1 rubygems

Version Path
dandelion-0.4.9 spec/dandelion/config_spec.rb
dandelion-0.4.8 spec/dandelion/config_spec.rb
dandelion-0.4.7 spec/dandelion/config_spec.rb
dandelion-0.4.6 spec/dandelion/config_spec.rb
dandelion-0.4.5 spec/dandelion/config_spec.rb
dandelion-0.4.4 spec/dandelion/config_spec.rb