Sha256: 1047b8bd6072224ca17c4735e353cc7838eba0f891a8ffd5a06196b1af8aaeec

Contents?: true

Size: 796 Bytes

Versions: 14

Compression:

Stored size: 796 Bytes

Contents

require 'spec_helper'

module Mork
  describe MimageList do
    before(:all) do
      tpg = sample_img(:two_pages)
      @mlist = MimageList.new(tpg.filename)
    end
    
    describe ".new" do
      it "should raise an error unless called with a string" do
        lambda {
          MimageList.new(666)
        }.should raise_error
      end
    end
    
    describe "[]" do
      it "should return the 1st mimage in the stack" do
        @mlist[0].should be_a(Mimage)
      end
      
      it "should return the last mimage in the stack" do
        @mlist[1].should be_a(Mimage)
      end
    end
    
    describe "each" do
      it "should loop over all images" do
        @mlist.each do |m|
          puts m.inspect
          m.should be_a(Mimage)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mork-0.1.3 spec/mork/mimage_list_spec.rb
mork-0.1.2 spec/mork/mimage_list_spec.rb
mork-0.1.1 spec/mork/mimage_list_spec.rb
mork-0.1.0 spec/mork/mimage_list_spec.rb
mork-0.0.12 spec/mork/mimage_list_spec.rb
mork-0.0.11 spec/mork/mimage_list_spec.rb
mork-0.0.10 spec/mork/mimage_list_spec.rb
mork-0.0.9 spec/mork/mimage_list_spec.rb
mork-0.0.8 spec/mork/mimage_list_spec.rb
mork-0.0.7 spec/mork/mimage_list_spec.rb
mork-0.0.6 spec/mork/mimage_list_spec.rb
mork-0.0.5 spec/mork/mimage_list_spec.rb
mork-0.0.3 spec/mork/mimage_list_spec.rb
mork-0.0.2 spec/mork/mimage_list_spec.rb