test/test_book_part.rb in review-1.4.0 vs test/test_book_part.rb in review-1.5.0
- old
+ new
@@ -23,29 +23,30 @@
end
assert_equal [1, 2, 3], tmp
end
def test_volume
- part = Book::Part.new(nil, nil, [])
+ book = Book::Base.new(nil)
+ part = Book::Part.new(book, nil, [])
assert part.volume
assert_equal 0, part.volume.bytes
assert_equal 0, part.volume.chars
assert_equal 0, part.volume.lines
chs = []
tfs = [] ## prevent from removing Tempfile
Tempfile.open('part_test') do |o|
o.print "12345"
- chs << Book::Chapter.new(nil, nil, nil, o.path)
+ chs << Book::Chapter.new(book, nil, nil, o.path)
tfs << o
end
Tempfile.open('part_test') do |o|
o.print "67890"
- chs << Book::Chapter.new(nil, nil, nil, o.path)
+ chs << Book::Chapter.new(book, nil, nil, o.path)
tfs << o
end
- part = Book::Part.new(nil, nil, chs)
+ part = Book::Part.new(book, nil, chs)
assert part.volume
assert part.volume.bytes > 0
assert part.volume.chars > 0
assert part.volume.lines > 0
end