Sha256: 886c131c58e8b6a462cd5f7277bcecec42e2c7afbdf65960ee507efe3fb272a3

Contents?: true

Size: 798 Bytes

Versions: 9

Compression:

Stored size: 798 Bytes

Contents

require 'spec_helper'
require 'pathname'

describe Heel::Configuration do
  before do
    @proj_root = Pathname.new( __FILE__ ).parent.parent
  end
  it "finds files relative to root of gem" do
    Heel::Configuration.root_dir.must_equal @proj_root.expand_path.to_s + File::SEPARATOR
  end

  it "finds files in the config dir of the project" do
    Heel::Configuration.config_path('config.rb').must_equal @proj_root.join("config", "config.rb").to_s
  end
  
  it "finds files in the data dir of the project" do
    Heel::Configuration.data_path('famfamfam', 'icons').must_equal @proj_root.join( "data", "famfamfam", "icons" ).to_s
  end
  
  it "finds files in the lib dir of the project" do
    Heel::Configuration.lib_path('heel.rb').must_equal @proj_root.join("lib", "heel.rb").to_s
  end

end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
heel-3.2.1 spec/configuration_spec.rb
heel-3.2.0 spec/configuration_spec.rb
heel-3.1.3 spec/configuration_spec.rb
heel-3.1.2 spec/configuration_spec.rb
heel-3.1.1 spec/configuration_spec.rb
heel-3.1.0 spec/configuration_spec.rb
heel-3.0.2 spec/configuration_spec.rb
heel-3.0.1 spec/configuration_spec.rb
heel-3.0.0 spec/configuration_spec.rb