Sha256: 0313203447e1edf79f1f3ba35869d3d4ce76c86abf9d3187b28d3cb10baf127f

Contents?: true

Size: 569 Bytes

Versions: 1

Compression:

Stored size: 569 Bytes

Contents

$:.unshift File.dirname(__FILE__)

require 'spec_helper'
require 'fileutils'

include FileUtils

describe Scissor::SoundFile do
  before do
    @mp3 = Scissor::SoundFile.new(fixture('sample.mp3'))
    @wav = Scissor::SoundFile.new(fixture('sine.wav'))
  end

  after do
  end

  it "raise error if unknown file format" do
    lambda {
      Scissor::SoundFile.new(fixture('foo.bar'))
    }.should raise_error(Scissor::SoundFile::UnknownFormat)
  end

  it "should get length" do
    @mp3.length.should be_within(0.1).of(178.1)
    @wav.length.should eql(1.0)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
scissor-0.2.9 spec/sound_file_spec.rb