Sha256: 53b6a55ff836316a6a2cb5ce3ecf387cbf9c2bafd64377cd6bc5b377869e49fe

Contents?: true

Size: 626 Bytes

Versions: 1

Compression:

Stored size: 626 Bytes

Contents

require_relative '../spec_helper'

describe Fest do
  describe '#initialize' do
    params = YAML.load_file("#{GEM_ROOT}/config/default.yml")
    let(:loader) { described_class.new(params) }

    params.each do |key, value|
      let(":#{key}") { value.is_a?(Array) ? eval(value.join('; ')) : value }

      context "when initialized with a set of @#{key}" do
        it "from params['#{key}']" do
          @path = params['path'] if key == 'index'
          expect(loader.instance_variable_get("@#{key}".to_sym)).
            to eq(value.is_a?(Array) ? eval(value.join('; ')) : value)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fest-1.3.10 spec/params/custom_spec.rb