spec/transition_spec.rb in music-transcription-0.3.0 vs spec/transition_spec.rb in music-transcription-0.4.0
- old
+ new
@@ -1,13 +1,31 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe Transition do
+ describe Transition::Immediate do
+ describe '.new' do
+ it "should assign duration of 0" do
+ t = Transition::Immediate.new()
+ t.duration.should eq(0)
+ end
+ end
+ end
- context '.new' do
- it "should assign duration and type given during construction" do
- t = Transition.new(:duration => 1.5, :type => Transition::LINEAR)
- t.duration.should eq(1.5)
- t.type.should eq(Transition::LINEAR)
+ describe Transition::Linear do
+ describe '.new' do
+ it "should assign duration given" do
+ t = Transition::Linear.new(1.5)
+ t.duration.should eq(1.5)
+ end
end
end
-
-end
+
+ describe Transition::Immediate do
+ describe '.new' do
+ it "should assign duration and abruptness given" do
+ t = Transition::Sigmoid.new(1.2, 0.4)
+ t.duration.should eq(1.2)
+ t.abruptness.should eq(0.4)
+ end
+ end
+ end
+end
\ No newline at end of file