spec/handbrake/titles_spec.rb in handbrake-0.2.0 vs spec/handbrake/titles_spec.rb in handbrake-0.2.1

- old
+ new

@@ -45,18 +45,26 @@ let(:titles) { Titles.from_output(body) } let(:title_1) { titles[1] } let(:title_3) { titles[3] } + it 'has a reference to its parent collection' do + title_1.collection.should eql(titles) + end + describe '#main_feature?' do it 'is true when it is' do title_1.should be_main_feature end it 'is false when it is' do title_3.should_not be_main_feature end + + it 'is not a complex value when true, so that serializations are simpler' do + title_1.main_feature?.should == true + end end it 'has the number' do title_1.number.should == 1 end @@ -95,9 +103,13 @@ chapter.seconds.should == 203 end it 'has the number' do chapter.number.should == 5 + end + + it 'has a reference to its parent' do + chapter.title.should eql title_3 end end end end