File: speech_test.rb

package info (click to toggle)
ruby-espeak 1.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 92 kB
  • sloc: ruby: 112; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 384 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

require 'test_helper'
require 'fileutils'

class SpeechTest < Test::Unit::TestCase
  include ESpeak

  def test_save
    FileUtils.rm_rf('test/tmp')
    FileUtils.mkdir_p('test/tmp')
    assert Speech.new('Hello!').save('test/tmp/test.mp3')
    assert File.exist?('test/tmp/test.mp3'), 'Mp3 file not generated'
    FileUtils.rm_rf('test/tmp')
  end
end