Sha256: 6f662a0e0ca08ff2080ba7443d246d6678d6e2ba8134fbecf9d069ebd3b82fc4

Contents?: true

Size: 663 Bytes

Versions: 3

Compression:

Stored size: 663 Bytes

Contents

require 'spec_helper'

describe Relish do

  it "has a .global_options_file setting" do
    Relish.global_options_file.should_not be_nil
  end

  context "when $HOME is not set" do
    before do
      @original_home = ENV['HOME']
      ENV['HOME'] = nil
      Object.send(:remove_const, :Relish)
      load 'lib/relish.rb'
    end

    after do
      ENV['HOME'] = @original_home
    end

    it "returns a non-expanded path to ~/.relish" do
      Relish.global_options_file.should == '~/.relish'
    end
  end

  it "allows global_options_file to be overwritten" do
    Relish.global_options_file = 'foo'
    Relish.global_options_file.should == 'foo'
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
relish-0.7.1 spec/relish_spec.rb
relish-0.7 spec/relish_spec.rb
relish-0.6 spec/relish_spec.rb