Sha256: 67bddfd4ae830564850458cc1792c3817f993bde0f3bca2fd1abbc480192e555

Contents?: true

Size: 679 Bytes

Versions: 10

Compression:

Stored size: 679 Bytes

Contents

require File.dirname(__FILE__) + '/../../spec_helper'

describe Reflection::Support::Home do
  before(:all) do
    @original_home_env = ENV['HOME']
    ENV['HOME'] = "/test/home"
  end
  
  before(:each) do
    @home = Reflection::Support::Home.new
  end
  
  describe '#path' do
    it 'should generate HOME_DIR/.reflection' do
      @home.path.should eql('/test/home/.reflection')
    end    
  end
  
  describe '#create' do
    it 'should create the directory' do
      File.stub!(:exist?).and_return(false)
      Dir.should_receive(:mkdir).with('/test/home/.reflection')
      @home.create
    end
  end
  
  after(:all) do
    ENV['HOME'] = @original_home_env    
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
basiszwo-reflection-0.5.1 spec/reflection/support/home_spec.rb
reflection-0.5.0 spec/reflection/support/home_spec.rb
reflection-0.4.6 spec/reflection/support/home_spec.rb
reflection-0.4.5 spec/reflection/support/home_spec.rb
reflection-0.4.4 spec/reflection/support/home_spec.rb
reflection-0.4.3 spec/reflection/support/home_spec.rb
reflection-0.4.1 spec/reflection/support/home_spec.rb
reflection-0.4.0 spec/reflection/support/home_spec.rb
reflection-0.3.1 spec/reflection/support/home_spec.rb
reflection-0.0.2 spec/reflection/support/home_spec.rb