Sha256: 9a163e49c4507bab6ebc53b0c03b233b1b03623116b0387a876d6127811ad668

Contents?: true

Size: 587 Bytes

Versions: 2

Compression:

Stored size: 587 Bytes

Contents

require 'spec_helper'
require 'yaml'

module MyModule
  extend YmlReader

  def self.default_directory
    'default_directory'
  end
end

describe YmlReader do
  context "when configuring the yml directory" do
    before(:each) do
      MyModule.yml_directory = nil
    end
    
    it "should store a yml directory" do
      MyModule.yml_directory = 'some_directory'
      MyModule.yml_directory.should == 'some_directory'
    end

    it "should default to a directory specified by the containing class" do
      MyModule.yml_directory.should == 'default_directory'
    end
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yml_reader-0.5 spec/yml_reader/yml_reader_spec.rb
yml_reader-0.4 spec/yml_reader/yml_reader_spec.rb