Sha256: c691351559ec9cfad851187ea8078a028d48c7992d66687f0941f1a4fe8dadcb

Contents?: true

Size: 1.65 KB

Versions: 2

Compression:

Stored size: 1.65 KB

Contents

require File.dirname(__FILE__) + '/../spec_helper.rb'

describe QuickTime::Track do
  describe "example.mov" do
    before(:each) do
      @movie = QuickTime::Movie.open(File.dirname(__FILE__) + '/../fixtures/example.mov')
    end
  
    describe "example.mov video track" do
      before(:each) do
        @track = @movie.video_tracks.first
      end
    
      it "duration should be 3.1 seconds" do
        @track.duration.should == 3.1
      end
    
      it "frame count should be 31" do
        @track.frame_count.should == 31
      end
    
      it "frame rate should be 10" do
        @track.frame_rate.should == 10
      end
    
      it "should be able to delete a track" do
        @track.delete
        @movie.video_tracks.should == []
      end
    
      it "should be able to add a track" do
        @track.delete
        @movie.video_tracks.should == []
      end
    
      it "should be able to disable and enable a track" do
        @track.should be_enabled
        @track.disable
        @track.should_not be_enabled
        @track.enable
        @track.should be_enabled
      end
    
      it "should have no offset" do
        @track.offset.should == 0
      end
    
      it "should be able to offset by 2.5 seconds" do
        @track.offset = 2.5
        @track.offset.should == 2.5
      end
    end
  
    describe "example.mov audio track" do
      before(:each) do
        @track = @movie.audio_tracks.first
      end
    
      it "should have a volume of 1.0" do
        @track.volume.should == 1.0
      end
    
      it "should be able to set volume to 0.5" do
        @track.volume = 0.5
        @track.volume.should == 0.5
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rmov-0.1.4 spec/quicktime/track_spec.rb
rmov-0.1.3 spec/quicktime/track_spec.rb