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

Version Path
mccloud-0.1.1 spec/environment/environment_spec.rb
mccloud-0.0.28 spec/environment/environment_spec.rb
mccloud-0.0.27 spec/environment/environment_spec.rb
mccloud-0.0.26 spec/environment/environment_spec.rb
mccloud-0.0.25 spec/environment/environment_spec.rb
mccloud-0.0.24 spec/environment/environment_spec.rb
mccloud-0.0.23 spec/environment/environment_spec.rb
mccloud-0.0.22 spec/environment/environment_spec.rb
mccloud-0.0.21 spec/environment/environment_spec.rb
mccloud-0.0.20 spec/environment/environment_spec.rb
mccloud-0.0.19 spec/environment/environment_spec.rb
mccloud-0.0.18 spec/environment/environment_spec.rb
mccloud-0.0.17 spec/environment/environment_spec.rb
mccloud-0.0.16 spec/environment/environment_spec.rb
mccloud-0.0.15 spec/environment/environment_spec.rb
mccloud-0.0.14 spec/environment/environment_spec.rb