Sha256: bf05ea456fa587e52f655a0f35f18de1935033cae575412b0bf75a21de1f291c

Contents?: true

Size: 703 Bytes

Versions: 3

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'
require 'wgif/gif_maker'
require 'wgif/video'

describe WGif::GifMaker do
  let(:gif_maker) { described_class.new }
  let(:image) { double(Magick::Image) }
  let(:images) { double(Magick::ImageList, each: nil) }

  before do
    allow(Magick::ImageList).to receive(:new).and_return(images)
  end

  it 'converts a directory of frames to a gif' do
    expect(images).to receive(:coalesce)
    expect(images).to receive(:optimize_layers)
    expect(images).to receive(:write).with('bjork.gif')
    gif_maker.make_gif([], 'bjork.gif', '500')
  end

  it 'resizes the image' do
    expect(image).to receive(:change_geometry).with('500')
    gif_maker.resize([image], '500')
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
wgif-0.5.4 spec/unit/wgif/gif_maker_spec.rb
wgif-0.5.3 spec/unit/wgif/gif_maker_spec.rb
wgif-0.5.2 spec/unit/wgif/gif_maker_spec.rb