Sha256: 20cbaae5c662bccb30529d748e32feb3bba7b0de2bac110fa6bb85c64dfa7eb4

Contents?: true

Size: 726 Bytes

Versions: 1

Compression:

Stored size: 726 Bytes

Contents

require "spec_helper"

module RockConfig
  describe Scanner do
    let(:configuration) do
      configuration = Configuration.new
      configuration.scanned_directories << File.join(Dir.pwd, "config")
      configuration.config_loaders << YamlLoader.new
      configuration
    end

    let(:scanner)       { Scanner.new(configuration) }
    let(:fixtures_path) { File.join(Dir.pwd, "spec", "fixtures") }

    it "finds nothing when the target doesnt exist" do
      expect do
        scanner.find("database")
      end.to raise_error(ConfigNotFound)
    end

    it "scans additional directories" do
      configuration.scanned_directories << fixtures_path
      scanner.find("database").should_not be_nil
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rock_config-0.0.1 spec/scanner_spec.rb