Sha256: 7a38c2f2615abefae42e43cca6624f8822d1f5fa712c947a9877a7a0b178a9fa

Contents?: true

Size: 543 Bytes

Versions: 9

Compression:

Stored size: 543 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Parsing::MeterParser do
  parser = Parsing::MeterParser.new
  
  {
    '4/4' => FOUR_FOUR,
    '2*3/8' => SIX_EIGHT,
    '12/3' => Meter.new(12,"1/3".to_r),
    '3*3/8' => Meter.new(3,"3/8".to_r),
    '3/4' => THREE_FOUR
  }.each do |str,met|
    res = parser.parse(str)
    
    it "should parse #{str}" do
      res.should_not be nil
    end
    
    it 'should produce node that properly converts to meter' do
      res.to_meter.should eq met
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
music-transcription-0.21.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.20.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.19.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.17.1 spec/parsing/meter_parsing_spec.rb
music-transcription-0.17.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.16.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.15.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.14.0 spec/parsing/meter_parsing_spec.rb
music-transcription-0.13.0 spec/parsing/meter_parsing_spec.rb