Sha256: ffb8d4811efdb75b63a6f3b45d04e41a6c6d8f8eacdc10bbe9c3af537e453758

Contents?: true

Size: 773 Bytes

Versions: 1

Compression:

Stored size: 773 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/common')
load '../bin/sensible-cinema'

module SensibleSwing
describe MainWindow do

  it "should auto-select an EDL if the title matches" do
    MainWindow.new.single_edit_list_matches_dvd("BOBS_BIG_PLAN").should_not be nil
  end
  
  it "should prompt if two match" do
    MainWindow.const_set(:EDL_DIR, 'temp')
    FileUtils.rm_rf 'temp'
    Dir.mkdir 'temp'
    MainWindow.new.single_edit_list_matches_dvd("BOBS_BIG_PLAN").should be nil
    Dir.chdir 'temp' do
      File.binwrite('a.txt', "dvd_drive_label: BOBS_BIG_PLAN")
      File.binwrite('b.txt', "dvd_drive_label: BOBS_BIG_PLAN")
    end
    MainWindow.new.single_edit_list_matches_dvd("BOBS_BIG_PLAN").should be nil
    
  end

end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sensible-cinema-0.14.6 spec/sensible_cinema_gui.spec.rb