test/test_edl.rb in edl-0.0.6 vs test/test_edl.rb in edl-0.0.7
- old
+ new
@@ -288,12 +288,23 @@
m1 = flexmock
m1.should_receive(:matches?).with("plop").once.and_return(true)
m1.should_receive(:apply).once
flexmock(p).should_receive(:get_matchers).once.and_return([m1, m1])
+ result = p.parse("plop")
+ result.should.be.empty
+ end
+
+ specify "register line numbers of the detected events" do
+ p = EDL::Parser.new
+ events = p.parse(File.open(SPLICEME))
- p.parse("plop")
+ events[0].line_number.should.not.be.nil
+ events[0].line_number.should.equal 4
+
+ events[1].line_number.should.not.be.nil
+ events[1].line_number.should.equal 5
end
end
context "A TimewarpMatcher should" do
@@ -490,11 +501,11 @@
mok_evt = flexmock
2.times { mok_evt.should_receive(:comments).and_return(comments) }
2.times { EDL::CommentMatcher.new.apply([mok_evt], line) }
- mok_evt.comments.should.equal ["COMMENT: PURE BULLSHIT", "COMMENT: PURE BULLSHIT"]
+ mok_evt.comments.should.equal ["* COMMENT: PURE BULLSHIT", "* COMMENT: PURE BULLSHIT"]
end
end
context "FallbackMatcher should" do
specify "match anything" do
@@ -546,11 +557,11 @@
comments = []
mok_evt.should_receive(:clip_name=).with('TAPE_6-10.MOV').once
mok_evt.should_receive(:comments).and_return(comments).once
EDL::NameMatcher.new.apply([mok_evt], line)
- comments.should.equal ["FROM CLIP NAME: TAPE_6-10.MOV"]
+ comments.should.equal ["* FROM CLIP NAME: TAPE_6-10.MOV"]
end
end
context "EffectMatcher should" do
@@ -574,10 +585,10 @@
mok_transition.should_receive(:effect=).with("CROSS DISSOLVE").once
EDL::EffectMatcher.new.apply([mok_evt], line)
- cmt.should.equal ["EFFECT NAME: CROSS DISSOLVE"]
+ cmt.should.equal ["* EFFECT NAME: CROSS DISSOLVE"]
end
end
context "A complex EDL passed via Parser should" do
\ No newline at end of file