Sha256: 269af7763a469c6abe4105efd1ddba72ed65d98fe38f60cb05ede15d8789e20c

Contents?: true

Size: 619 Bytes

Versions: 5

Compression:

Stored size: 619 Bytes

Contents

require "spec_helper"

module RockConfig
  describe YamlLoader do
    it "loads config when given valid path and filename" do
      directory = File.join(Dir.pwd, "spec", "fixtures") 

      loader = YamlLoader.new
      config = loader.find_at(directory, "database")

      config.should_not be_nil
    end

    it "throws exception when given valid path to an invalid file" do
      directory = File.join(Dir.pwd, "spec", "fixtures") 
      loader = YamlLoader.new

      expect do
        config = loader.find_at(directory, "database_invalid")
      end.to raise_error(RockConfig::ConfigLoadError)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rock_config-0.0.6 spec/yaml_loader_spec.rb
rock_config-0.0.5 spec/yaml_loader_spec.rb
rock_config-0.0.4 spec/yaml_loader_spec.rb
rock_config-0.0.3 spec/yaml_loader_spec.rb
rock_config-0.0.2 spec/yaml_loader_spec.rb