Skip to content

Commit e2efd07

Browse files
committed
Updated tests.
1 parent 5837e0c commit e2efd07

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/id3v2_frames_test.rb

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,11 +120,12 @@ class TestID3v2Frames < Test::Unit::TestCase
120120

121121
@tag.add_frame(toc)
122122

123-
assert_equal TagLib::ID3v2::TableOfContentsFrame, @tag.frame_list('CTOC').first.class
124-
assert_equal 1, @tag.frame_list('CTOC').size
125-
assert_equal 'TOC', @tag.frame_list('CTOC').first.element_id
126-
assert_equal 3, @tag.frame_list('CTOC').first.child_elements.size
127-
assert_equal %w[CH1 CH2 CH3], @tag.frame_list('CTOC').first.child_elements
123+
ctoc_frame_list = @tag.frame_list('CTOC')
124+
assert_equal TagLib::ID3v2::TableOfContentsFrame, ctoc_frame_list.first.class
125+
assert_equal 1, ctoc_frame_list.size
126+
assert_equal 'TOC', ctoc_frame_list.first.element_id
127+
assert_equal 3, ctoc_frame_list.first.child_elements.size
128+
assert_equal %w[CH1 CH2 CH3], ctoc_frame_list.first.child_elements
128129
end
129130

130131
should 'have CHAP frames (multiple chapters)' do
@@ -143,9 +144,12 @@ class TestID3v2Frames < Test::Unit::TestCase
143144
@tag.add_frame(chapter_frame)
144145
end
145146

146-
assert_equal TagLib::ID3v2::ChapterFrame, @tag.frame_list('CHAP').first.class
147-
assert_equal 3, @tag.frame_list('CHAP').size
148-
assert_equal 'CH1', @tag.frame_list('CHAP').first.element_id
147+
chap_frame_list = @tag.frame_list('CHAP')
148+
assert_equal TagLib::ID3v2::ChapterFrame, chap_frame_list.first.class
149+
assert_equal 3, chap_frame_list.size
150+
assert_equal 'CH1', chap_frame_list[0].element_id
151+
assert_equal 'CH2', chap_frame_list[1].element_id
152+
assert_equal 'CH3', chap_frame_list[2].element_id
149153
end
150154
end
151155

0 commit comments

Comments
 (0)