Sha256: 6ef325bff012a895554b462e95d1927666225011869c4c9d260e8886ad398592
Contents?: true
Size: 1.29 KB
Versions: 3
Compression:
Stored size: 1.29 KB
Contents
require 'spec_helper' describe Serinette do it 'should have a variable called OUTPUT_FILE_NAME' do expect(Serinette::OUTPUT_FILE_NAME).not_to be_nil end it 'should have a variable called TMP_DIR' do expect(Serinette::TMP_DIR).not_to be_nil end it 'should have a variable called SOUND_FILE_TYPE' do expect(Serinette::SOUND_FILE_TYPE).not_to be_nil end describe '.clean' do it 'should exist' do expect(Serinette).to respond_to(:clean) end it 'should remove all wav files from the tmp directory' do file_name = "#{Serinette::TMP_DIR}test.#{Serinette::SOUND_FILE_TYPE}" FileUtils.touch(file_name) Serinette.clean expect(File.exist?(file_name)).to be false end end describe '.output_path' do it 'should exist' do expect(Serinette).to respond_to(:output_path) end it 'should get output path' do path = Serinette::TMP_DIR + Serinette::OUTPUT_FILE_NAME + Serinette::SOUND_FILE_TYPE expect(Serinette.output_path).to eq path end end describe '.orchestrate' do it 'should exist' do expect(Serinette).to respond_to(:orchestrate) end it 'should output a file' do Serinette.orchestrate expect(File.exist?(Serinette.output_path)).to be true end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
serinette-0.0.3 | spec/serinette_spec.rb |
serinette-0.0.2 | spec/serinette_spec.rb |
serinette-0.0.0.pre | spec/serinette_spec.rb |