<commit_before>require File.dirname(__FILE__) + "/test_helper"

describe "Rubypond" do
  it "should display the correct string in respond to :version" do
    v = File.open(File.join(File.dirname(__FILE__), "..", "VERSION"), "r").readlines.map(&:strip).join("").strip
    Rubypond.version.should == v
  end
  
  describe "\b.duration" do
    it "should return the correct value for 0.125" do
      Rubypond.duration(0.125).should == "128"
    end
    it "should return the correct value for 0.25" do
      Rubypond.duration(0.25).should == "64"
    end
    it "should return the correct value for 0.5" do
      Rubypond.duration(0.5).should == "32"
    end
    it "should return the correct value for 0.75" do
      Rubypond.duration(0.75).should == "32."
    end
    it "should return the correct value for 1" do
      Rubypond.duration(1).should == "16"
    end
    it "should return the correct value for 2" do
      Rubypond.duration(2).should == "8"
    end<commit_msg>Adds failing tests for Rubypond::INSTRUMENTS.<commit_after>require File.dirname(__FILE__) + "/test_helper"

describe "Rubypond" do
  it "should display the correct string in respond to :version" do
    v = File.open(File.join(File.dirname(__FILE__), "..", "VERSION"), "r").readlines.map(&:strip).join("").strip
    Rubypond.version.should == v
  end
  
  describe "\b::INSTRUMENTS" do
    describe "\b' default hash" do
      before do
        @hash = Rubypond::INSTRUMENTS[:no_way_is_this_in_the_hash_keys]
      end
      
      it "should return the correct value for :instrument_name" do
        @hash[:instrument_name].should == "Staff"
      end
      it "should return the correct value for :short_instrument_name" do
        @hash[:short_instrument_name].should == "Staff"
      end
      it "should return the correct value for :display_name" do
        @hash[:display_name].should == "staff"
      end
      it "should return the correct value for :clef" do
        @hash[:clef].should == "treble"
      end
      it "should return the correct value for :relative_c" do
        @hash[:relative_c].should == "c4"
      end
    end

    describe "\b[:violin]" do
      before do
        @hash = Rubypond::INSTRUMENTS[:violin]
      end

      it "should return the correct value for :instrument_name" do
        @hash[:instrument_name].should == "Violin"
      end
      it "should return the correct value for :short_instrument_name" do
        @hash[:short_instrument_name].should == "Vln"
      end
      it "should return the correct value for :display_name" do
        @hash[:display_name].should == "violin"
      end
      it "should return the correct value for :clef" do
        @hash[:clef].should == "treble"
      end
      it "should return the correct value for :relative_c" do
        @hash[:relative_c].should == "c4"
      end      
    end
    
    describe "\b[:cello]" do
      before do
        @hash = Rubypond::INSTRUMENTS[:cello]
      end

      it "should return the correct value for :instrument_name" do
        @hash[:instrument_name].should == "Violoncello"
      end
      it "should return the correct value for :short_instrument_name" do
        @hash[:short_instrument_name].should == "Vlc."
      end
      it "should return the correct value for :display_name" do
        @hash[:display_name].should == "violoncello"
      end
      it "should return the correct value for :clef" do
        @hash[:clef].should == "bass"
      end
      it "should return the correct value for :relative_c" do
        @hash[:relative_c].should == "c3"
      end      
    end
  end
  
  describe "\b.duration" do
    it "should return the correct value for 0.125" do
      Rubypond.duration(0.125).should == "128"
    end
    it "should return the correct value for 0.25" do
      Rubypond.duration(0.25).should == "64"
    end
    it "should return the correct value for 0.5" do
      Rubypond.duration(0.5).should == "32"
    end
    it "should return the correct value for 0.75" do
      Rubypond.duration(0.75).should == "32."
    end
    it "should return the correct value for 1" do
      Rubypond.duration(1).should == "16"
    end
    it "should return the correct value for 2" do
      Rubypond.duration(2).should == "8"
    end
{'fraction_non_alphanumeric': 0.11234363936747699, 'fraction_numerical': 0.01958933207458107, 'mean_word_length': 2.631533847472151, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1641645', 'n_tokens_mistral': 1350, 'n_tokens_neox': 1314, 'n_words': 414}