Sha256: 6d082a14869a66dcb3b6982914525171213192def2f92db2573339e6506da129
Contents?: true
Size: 1.11 KB
Versions: 22
Compression:
Stored size: 1.11 KB
Contents
require File.dirname(__FILE__) + '/test_helper' class VistaSystemTest < Test::Unit::TestCase include SproutTestCase context "new windows vista system" do setup do @user_system = Sprout::System::VistaSystem.new end should "work when env_userprofile isn't found" do @user_system.stubs(:find_home).returns 'C:\Documents and Settings\Some System' File.stubs(:exists?).returns true assert_equal 'C:\Documents and Settings\Some System/Local Settings/Application Data', @user_system.library end context "with a valid userprofile" do setup do @user_system.stubs(:env_userprofile).returns '/somehome' end should "find library" do File.stubs(:exists?).returns true assert_equal '/somehome/Local Settings/Application Data', @user_system.library end should "wrap paths that have spaces with escaped quotes" do assert_equal "\"foo bar\"", @user_system.clean_path("foo bar") end should "not modify paths that have no spaced" do assert_equal "foobar", @user_system.clean_path("foobar") end end end end
Version data entries
22 entries across 22 versions & 1 rubygems