Sha256: 266a1ce8d4994c052f543d60700cad4f910a326def3affddaa5bd2f11ee21e9f

Contents?: true

Size: 707 Bytes

Versions: 2

Compression:

Stored size: 707 Bytes

Contents

require "gifanime"
describe Gifanime do
  let(:images) do
    dir = File.dirname(__FILE__)
    %W{
      #{dir}/images/a.png
      #{dir}/images/b.png
      #{dir}/images/c.png
    }
  end

  describe "#generate!" do
    let(:outputfile) do
      "#{File.dirname(__FILE__)}/images/output.gif"
    end

    let(:gifanime) do
      Gifanime.new(outputfile)
    end

    before do
      images.each do |image|
        gifanime.add(image)
      end
    end

    after do
      path = Pathname.new(outputfile)
      path.delete if path.exist?
    end

    it "generates GIF animation" do
      gifanime.generate!.should be_a(::Magick::ImageList)
      File.read(outputfile).should_not be_empty
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gifanime-0.1.1 spec/gifanime_spec.rb
gifanime-0.1.0 spec/gifanime_spec.rb