Sha256: effb3e2cd405f909a1ae598b186a46ab6d2d5360ac663478877bdc9d4601f9a1

Contents?: true

Size: 686 Bytes

Versions: 11

Compression:

Stored size: 686 Bytes

Contents

require 'spec_helper'

describe DataMagic do
  context "when configuring the yml directory" do
    before(:each) do
      DataMagic.yml_directory = nil
    end
    
    it "should default to a directory named config" do
      DataMagic.yml_directory.should == 'config/data'
    end

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

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

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
data_magic-0.15.2 spec/lib/data_magic_spec.rb
data_magic-0.15.1 spec/lib/data_magic_spec.rb
data_magic-0.15 spec/lib/data_magic_spec.rb
data_magic-0.14 spec/lib/data_magic_spec.rb
data_magic-0.13 spec/lib/data_magic_spec.rb
data_magic-0.12 spec/lib/data_magic_spec.rb
data_magic-0.11 spec/lib/data_magic_spec.rb
data_magic-0.10 spec/lib/data_magic_spec.rb
data_magic-0.9 spec/lib/data_magic_spec.rb
data_magic-0.8 spec/lib/data_magic_spec.rb
data_magic-0.7 spec/lib/data_magic_spec.rb