minicomic-backend/test/pagination_test.rb

27 lines
547 B
Ruby
Raw Normal View History

2010-09-12 13:16:44 +00:00
require 'test_helper'
require 'minicomic-backend/pagination'
2010-01-07 03:56:52 +00:00
class TestPagination < Test::Unit::TestCase
def setup
@pagination = Class.new do
include Pagination
end.new
end
def test_paginate_raises
[ '', [], [''] ].each do |files|
assert_raise RuntimeError do
@pagination.paginate(files)
end
end
end
def test_setup_sheet_faces
assert_equal [
[ 'file4', 'file1' ], [ 'file2', 'file3' ]
], @pagination.setup_sheet_faces([
'file1', 'file2', 'file3', 'file4'
])
end
end