Sha256: 866b913e30b81f89c75b9be9c737fd428a11137b9cca52c4ba40ca02f5ce34d3

Contents?: true

Size: 643 Bytes

Versions: 5

Compression:

Stored size: 643 Bytes

Contents

require 'spec_helper'

describe DataMagic do
  context "when configuring the yml directory" do
    it "should default to a directory named config" do
      DataMagic::Config.yml_directory.should == 'config'
    end

    it "should store a yml directory" do
      DataMagic::Config.yml_directory = 'test_dir'
      DataMagic::Config.yml_directory.should == 'test_dir'
    end
  end

  context "when reading yml files" do
    it "should read files from the config directory" do
      DataMagic::Config.yml_directory = 'test'
      YAML.should_receive(:load_file).with("test/fname").and_return({})
      DataMagic.load("fname")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
data_magic-0.5 spec/lib/data_magic_spec.rb
data_magic-0.4 spec/lib/data_magic_spec.rb
data_magic-0.3 spec/lib/data_magic_spec.rb
data_magic-0.2 spec/lib/data_magic_spec.rb
data_magic-0.1 spec/lib/data_magic_spec.rb