Sha256: 25235cd31110346e7507e2a2356199aa92d09fe9921c32b423019d7a12dd0c5b
Contents?: true
Size: 895 Bytes
Versions: 15
Compression:
Stored size: 895 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Actions::ReloadConfiguration do context '#initialize' do it 'accepts a config instance' do config = double(config) expect { Actions::ReloadConfiguration.new(config) }.not_to raise_error end end context '#run' do it 'reloads configuration from known places' do config_file = create_file 'config.yaml', <<-EOS.strip_heredoc --- :gem_path: '/asdf/bin/local_pac' EOS LocalPac.config = LocalPac::Config.new(config_file) config_file = create_file 'config.yaml', <<-EOS.strip_heredoc --- :gem_path: 'asdf' EOS config = LocalPac::Config.new(config_file) with_environment 'HOME' => working_directory do Actions::ReloadConfiguration.new(config).run end expect(LocalPac.config.gem_path).to eq('asdf') end end end
Version data entries
15 entries across 15 versions & 1 rubygems