Sha256: 0a34cbe2c4a8902415c72dc884524b59446c0d7ff05bc0425f9a9c5510fdf0f8

Contents?: true

Size: 577 Bytes

Versions: 1

Compression:

Stored size: 577 Bytes

Contents

require 'test/unit'
require 'lib/rapinoe'
include Rapinoe

class TestSlide < Test::Unit::TestCase
  def setup
    @keynote = Keynote.new('test/fixtures/ice-cream.key')
    @slide   = @keynote.slides.first
  end

  def test_preview_data
    assert_equal 1484, @slide.preview_data.size
  end

  def test_write_preview_to_file
    tempfile = "/tmp/rapinoe-slide-preview.jpg"

    refute File.exist?(tempfile)
    @slide.write_preview_to_file(tempfile)

    assert File.exist?(tempfile)
    assert_operator File.size(tempfile), :>, 1484
  ensure
    File.delete tempfile
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rapinoe-0.0.1 test/test_slide.rb