Class: DevSystem::FileShellTest
- Inherits:
-
ShellTest
- Object
- Liza::Unit
- Liza::Test
- Liza::UnitTest
- Liza::ControllerTest
- ShellTest
- DevSystem::FileShellTest
- Defined in:
- lib/dev_system/sub/shell/shells/file_shell_test.rb
Direct Known Subclasses
BinShellTest, DirShellTest, TextFileShellTest, TextShellTest
Instance Method Summary collapse
-
#tmp_dir ⇒ Object
before do puts tmp.to_s.magenta end.
Methods inherited from Liza::UnitTest
Methods inherited from Liza::Test
Methods inherited from Liza::Unit
const_missing, division, part, system, #system, test_class
Instance Method Details
#tmp_dir ⇒ Object
before do
puts tmp.to_s.magenta
end
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dev_system/sub/shell/shells/file_shell_test.rb', line 7 def tmp_dir @tmp_dir ||= begin name = self.class.name.split("::").map(&:snakefy).join "_" time = Time.now.strftime "%Y%m%d_%H%M%S" random = SecureRandom.hex 4 ret = Pathname.new(Dir.pwd).join "tmp/test_#{App.mode}_#{name}_#{time}_#{random}" FileUtils.mkdir_p ret log "Created tmp_dir: #{ret}" ret end end |