Sha256: 813a00106e62e83c258425651e67eaea850602df0137fce47f2cc1ece7a28632

Contents?: true

Size: 804 Bytes

Versions: 2

Compression:

Stored size: 804 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe Ffprober::Parser do
  let(:before_one_zero) { {major: 0, minor: 9, patch: 0} }
  let(:one_zero)        { {major: 1, minor: 0, patch: 0} }
  let(:after_one_zero)  { {major: 1, minor: 9, patch: 0} }

  context 'validates the ffprobe version' do
    it 'detects versions < 0.9' do
      Ffprober::Parser.stub(:ffprobe_version) { before_one_zero }
      Ffprober::Parser.ffprobe_version_valid?.should be_true
    end

    it 'detects versions 1.0' do
      Ffprober::Parser.stub(:ffprobe_version) { one_zero }
      Ffprober::Parser.ffprobe_version_valid?.should be_true
    end

    it 'detects versions 1.9' do
      Ffprober::Parser.stub(:ffprobe_version) { after_one_zero }
      Ffprober::Parser.ffprobe_version_valid?.should be_false
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ffprober-0.1.2 spec/ffprober/parser_spec.rb
ffprober-0.1.1 spec/ffprober/parser_spec.rb