spec/scissor_spec.rb in scissor-0.5.0 vs spec/scissor_spec.rb in scissor-0.6.0
- old
+ new
@@ -236,13 +236,12 @@
scissor.should be_an_instance_of(Scissor::Tape)
scissor.duration.should be_within(0.1).of(120)
scissor.fragments.size.should eql(1)
end
- it "should raise error if replaced range is out of duration" do
- lambda {
- @mp3.slice(0, 100).replace(60, 41, @mp3.slice(0, 60))
- }.should raise_error(Scissor::Tape::OutOfDuration)
+ it "should expand if replaced range is out of duration" do
+ replaced = @mp3.slice(0, 100).replace(60, 41, @mp3.slice(0, 60))
+ replaced.duration.should eql(120.0)
end
it "should write to file and return new instance of Scissor" do
scissor = @mp3.slice(0, 120) + @mp3.slice(150, 20)
result = scissor.to_file('/tmp/scissor-test/out.mp3')