Module: App::Etest

Defined in:
lib/vex/base/app.rb

Instance Method Summary collapse

Instance Method Details

#test_appObject



106
107
108
# File 'lib/vex/base/app.rb', line 106

def test_app
  assert_not_nil(App.root)
end

#test_revisionObject



110
111
112
# File 'lib/vex/base/app.rb', line 110

def test_revision
  assert_equal("", App.revision)
end

#test_subdirObject



114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# File 'lib/vex/base/app.rb', line 114

def test_subdir
  x = "#{App.root}/test-x"
  FileUtils.rm_rf x

  path = "#{x}/y"
  path2 = "#{x}/z"

  assert_equal(path, App.subdir("test-x", :y))
  assert File.directory?(path)

  #
  # now try the same with an existing link
  FileUtils.symlink path, path2

  assert_equal(path2, App.subdir("test-x", :z))
  assert File.symlink?(path2)
  assert File.directory?(path2)

  FileUtils.rm_rf x
end