Sha256: 0387f2cc2fc315d95b2c49265cf0f314ee5b62929df26f652709ed581685474a
Contents?: true
Size: 675 Bytes
Versions: 10
Compression:
Stored size: 675 Bytes
Contents
require File.dirname(__FILE__) + '/base' require 'fileutils' describe Some do before do @work_path = "/tmp/spec_#{Process.pid}/" FileUtils.mkdir_p(@work_path) File.open("#{@work_path}/config.yml", "w") do |f| f.write YAML.dump({}) end @some = Some.new @some.stubs(:some_dir).returns(@work_path) end after do FileUtils.rm_rf(@work_path) end it "defaults to user root if none is specified in the config" do @some.config['user'].should == 'root' end it "uses specified user if one is in the config" do File.open("#{@work_path}/config.yml", "w") do |f| f.write YAML.dump('user' => 'joe') end @some.config['user'].should == 'joe' end end
Version data entries
10 entries across 10 versions & 1 rubygems