Sha256: c4000be7a75f61e15f639158f2f465ac74409f65be815a9a29d5dc1e1270e6a7

Contents?: true

Size: 772 Bytes

Versions: 3

Compression:

Stored size: 772 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)+"/../helper.rb")
require_files "base"

describe "base" do
  
  describe "inside" do
    it "can execute a command inside a directory" do
      inside "./spec/unit" do
        Dir.pwd.should =~ /spec\/unit$/i
      end
    end

    it "throws an exception when you go to an improper directory" do
      expecting_exception(Errno::ENOENT){inside("./spec/unitz"){ Dir.pwd }}
    end
  end
  
  describe "within" do
    it "can execute a command inside a directory" do
      within "./spec/unit" do
        Dir.pwd.should =~ /spec\/unit$/i
      end
    end
    
    it "throws an exception when you go to an improper directory" do
      expecting_exception(Errno::ENOENT){within("./spec/unitz"){ Dir.pwd }}
    end
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
buildem-0.0.5 spec/unit/base_spec.rb
buildem-0.0.4 spec/unit/base_spec.rb
buildem-0.0.3 spec/unit/base_spec.rb