Sha256: 92427b56649e8e6b56d5ce7631c63907876a81304eeec8c93f387bb0f1b8c85e

Contents?: true

Size: 678 Bytes

Versions: 8

Compression:

Stored size: 678 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
    Magick::ImageList.stub(:new).and_return(images)
  end

  it 'converts a directory of frames to a gif' do
    images.should_receive(:coalesce)
    images.should_receive(:optimize_layers)
    images.should_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

8 entries across 8 versions & 1 rubygems

Version Path
wgif-0.5.1 spec/unit/wgif/gif_maker_spec.rb
wgif-0.5.0 spec/unit/wgif/gif_maker_spec.rb
wgif-0.4.0 spec/unit/wgif/gif_maker_spec.rb
wgif-0.3.1 spec/unit/wgif/gif_maker_spec.rb
wgif-0.3.0 spec/unit/wgif/gif_maker_spec.rb
wgif-0.2.0 spec/wgif/gif_maker_spec.rb
wgif-0.0.1 spec/wgif/gif_maker_spec.rb
wgif-0.0.1.pre spec/wgif/gif_maker_spec.rb