Sha256: 9f8c9de306100cc967b6042ddf9a538b5f68610ccff3de1124fd016d921ec3d7
Contents?: true
Size: 1.01 KB
Versions: 1
Compression:
Stored size: 1.01 KB
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe Interval do before :all do @pitch = C4 end context '.new' do it "should assign :pitch parameter given during construction" do interval = Interval.new :pitch => @pitch interval.pitch.should eq(@pitch) end it "should assign :link parameter if given during construction" do link = Link.new(:relationship => Link::RELATIONSHIP_TIE, :target_pitch => @pitch) interval = Interval.new :pitch => @pitch, :link => link interval.link.should eq(link) end end context '#pitch=' do it "should assign pitch" do interval = Interval.new :pitch => @pitch interval.pitch = Gb4 interval.pitch.should eq Gb4 end end context '#link=' do it "should assign link" do link = Link.new(:relationship => Link::RELATIONSHIP_SLUR, :target_pitch => G2) interval = Interval.new :pitch => @pitch interval.link = link interval.link.should eq(link) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
music-transcription-0.3.0 | spec/interval_spec.rb |