Sha256: 4fa47d90f0e43b63872425775fab9936ddd025a49d194d87af3929773116237a
Contents?: true
Size: 816 Bytes
Versions: 16
Compression:
Stored size: 816 Bytes
Contents
require 'mccloud' require 'tempfile' describe "Mccloud environment" do it "With a cwd passed, and no mccloudfile in any parentdir, the default would be currentdir" do tempdir = Dir.mktmpdir begin env=Mccloud::Environment.new(:cwd => tempdir) Pathname(env.root_path).dirname.realpath.should == Pathname(tempdir).dirname.realpath ensure FileUtils.remove_entry_secure tempdir end end it "With a cwd passed, and a mccloudfile in it, the default would be currentdir" do tempdir = Dir.mktmpdir FileUtils.touch(File.join(tempdir,"Mccloudfile")) begin env=Mccloud::Environment.new(:cwd => tempdir) Pathname(env.root_path).dirname.realpath.should == Pathname(tempdir).dirname.realpath ensure FileUtils.remove_entry_secure tempdir end end end
Version data entries
16 entries across 16 versions & 1 rubygems