Sha256: 19611ce41aa632504c540b2acefec458476c6b351d06a2178dfe0046aad9f47a
Contents?: true
Size: 1.27 KB
Versions: 22
Compression:
Stored size: 1.27 KB
Contents
require File.dirname(__FILE__) + '/test_helper' class UnixSystemTest < Test::Unit::TestCase include SproutTestCase context "new unix system" do setup do @user = Sprout::System::UnixSystem.new @user.stubs(:home).returns '/home/someone' end should "escape spaces in paths" do assert_equal 'a\ b', @user.clean_path('a b') end should "snake case application name" do assert_equal '.foo_bar', @user.format_application_name('Foo Bar') end should "have home" do assert_equal '/home/someone', @user.home end should "have library" do assert_equal '/home/someone', @user.library end should "format application home" do assert_equal '/home/someone/.sprouts', @user.application_home('Sprouts') end context "when fed an application with windows line endings" do setup do @source = File.join fixtures, 'executable', 'windows_line_endings' @target = File.join fixtures, 'executable', 'windows_line_endings.tmp' FileUtils.cp @source, @target end teardown do remove_file @target end should "fix windows line endings" do @user.expects :repair_executable @user.attempt_to_repair_executable @target end end end end
Version data entries
22 entries across 22 versions & 1 rubygems