Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e8e6c60438
Fetching contributors…

Cannot retrieve contributors at this time

33 lines (24 sloc) 0.877 kb
require 'test_helper'
class WinNixSystemTest < Test::Unit::TestCase
include Sprout::TestHelper
context "new windows nix (cygwin/mingw) system" do
setup do
@sys = Sprout::System::WinNixSystem.new
@sys.stubs(:win_home).returns 'C:\Documents and Settings\Some System'
end
should "find home on cygwin" do
File.stubs(:exists?).returns false
assert_equal '/cygdrive/c/Documents and Settings/Some System', @sys.home
end
should "find home on mingw" do
File.stubs(:exists?).returns true
assert_equal 'C:/Documents and Settings/Some System', @sys.home
end
should "wrap paths that have spaces with escaped quotes" do
assert_equal "\"foo bar\"", @sys.clean_path("foo bar")
end
should "not modify paths that have no spaced" do
assert_equal "foobar", @sys.clean_path("foobar")
end
end
end
Jump to Line
Something went wrong with that request. Please try again.