Sha256: f4849f1d6332e06b3834bdedb885ff9602adcb961341311c4579897db15d4ecd

Contents?: true

Size: 539 Bytes

Versions: 8

Compression:

Stored size: 539 Bytes

Contents

require "rspec"
require "rspec_helper"

describe "DesignShell::Context" do

	it "should find repo path upward" do
		tempdir = MiscUtils.real_path(MiscUtils.make_temp_dir('designshell_context_spec'))
		Dir.mkdir(git_dir = File.join(tempdir,'.git'))
		Dir.mkdir(File.join(tempdir,'one'))
		orange = File.join(tempdir,'one/apple/orange')
		FileUtils.mkpath(orange)
		Dir.mkdir(File.join(tempdir,'two'))
		Dir.chdir(orange)
		context = DesignShell::Context.new({})
		context.pwd.should==orange
		context.find_git_root.should==tempdir
	end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
designshell-0.0.8 spec/designshell_context_spec.rb
designshell-0.0.7 spec/designshell_context_spec.rb
designshell-0.0.6 spec/designshell_context_spec.rb
designshell-0.0.5 spec/designshell_context_spec.rb
designshell-0.0.4 spec/designshell_context_spec.rb
designshell-0.0.3 spec/designshell_context_spec.rb
designshell-0.0.2 spec/designshell_context_spec.rb
designshell-0.0.1 spec/designshell_context_spec.rb