spec/part_spec.rb in music-transcription-0.4.3 vs spec/part_spec.rb in music-transcription-0.5.2
- old
+ new
@@ -1,18 +1,20 @@
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe Part do
context '.new' do
- its(:notes) { should be_empty }
-
- it "should assign loudness_profile profile given during construction" do
- loudness_profile = Profile.new(0.5, 1.0 => linear_change(1.0, 2.0))
- part = Part.new loudness_profile: loudness_profile
- part.loudness_profile.should eq(loudness_profile)
+ it 'should have no notes' do
+ Part.new.notes.should be_empty
+ end
+
+ it "should assign dynamic profile given during construction" do
+ profile = Profile.new(Dynamics::FFF, { 1.0 => Change::Immediate.new(Dynamics::PP) })
+ part = Part.new dynamic_profile: profile
+ part.dynamic_profile.should eq(profile)
end
it "should assign notes given during construction" do
- notes = [ Note.new(0.25, [C1,D1]) ]
+ notes = [ Note::Quarter.new([C1,D1]) ]
part = Part.new notes: notes
part.notes.should eq(notes)
end
end
end