Class: SavedAssetTest
- Defined in:
- lib/saved_assets.rb
Instance Method Summary collapse
Instance Method Details
#test_script_name ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/saved_assets.rb', line 37 def test_script_name filename = 'sample.txt' prefix = 'test' time = Time.new(2023, 1, 1, 12, 0, 0) # Sample date-time for consistency in testing blockname = 'block1' expected_name = 'test_2023-01-01-12-00-00_sample.txt_,_block1.sh' assert_equal expected_name, MarkdownExec::SavedAsset.script_name(filename: filename, prefix: prefix, time: time, blockname: blockname) end |
#test_stdout_name ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/saved_assets.rb', line 49 def test_stdout_name filename = 'sample.txt' prefix = 'test' time = Time.new(2023, 1, 1, 12, 0, 0) blockname = 'block1' expected_name = 'test_2023-01-01-12-00-00_sample.txt_,_block1.out.txt' assert_equal expected_name, MarkdownExec::SavedAsset.stdout_name(filename: filename, prefix: prefix, time: time, blockname: blockname) end |