<commit_before>require File.dirname(__FILE__) + '/../../spec_helper'
require 'sdp/description_fields/timing_field'

describe SDP::DescriptionFields::TimingField do
  context "#initialize" do
    before do
      @timing_field = SDP::DescriptionFields::TimingField.new
    end

    it "sets :sdp_type set to 't'" do
      @timing_field.sdp_type.should == 't'
    end

    it "sets :ruby_type set to :uri" do
      @timing_field.ruby_type.should == :timing
    end

    it "sets :required set to true" do
      @timing_field.required.should be_true
    end

    it "sets :value[:start_time] set to a number" do
      @timing_field.value[:start_time].class.should == Fixnum
    end

    it "sets :value[:stop_time] set to a number" do
      @timing_field.value[:stop_time].class.should == Fixnum
    end

    it "is NOT valid" do
      @timing_field.valid?.should be_true
    end
  end

  context "working with the object" do
    before :each do
      @timing_field = SDP::DescriptionFields::TimingField.new
    end

    it "can accept a new value of :start_time => 12345" do
      stop_time = @timing_field.value[:stop_time]
      @timing_field.value = { :start_time => 12345 }
      @timing_field.value[:start_time].should == 12345
      @timing_field.value[:stop_time].should == stop_time<commit_msg>Fixed uri reference<commit_after>require File.dirname(__FILE__) + '/../../spec_helper'
require 'sdp/description_fields/timing_field'

describe SDP::DescriptionFields::TimingField do
  context "#initialize" do
    before do
      @timing_field = SDP::DescriptionFields::TimingField.new
    end

    it "sets :sdp_type set to 't'" do
      @timing_field.sdp_type.should == 't'
    end

    it "sets :ruby_type set to :timing" do
      @timing_field.ruby_type.should == :timing
    end

    it "sets :required set to true" do
      @timing_field.required.should be_true
    end

    it "sets :value[:start_time] set to a number" do
      @timing_field.value[:start_time].class.should == Fixnum
    end

    it "sets :value[:stop_time] set to a number" do
      @timing_field.value[:stop_time].class.should == Fixnum
    end

    it "is NOT valid" do
      @timing_field.valid?.should be_true
    end
  end

  context "working with the object" do
    before :each do
      @timing_field = SDP::DescriptionFields::TimingField.new
    end

    it "can accept a new value of :start_time => 12345" do
      stop_time = @timing_field.value[:stop_time]
      @timing_field.value = { :start_time => 12345 }
      @timing_field.value[:start_time].should == 12345
      @timing_field.value[:stop_time].should == stop_time
{'fraction_non_alphanumeric': 0.10970464135021098, 'fraction_numerical': 0.011507479861910242, 'mean_word_length': 3.1996779388083736, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '127892', 'n_tokens_mistral': 902, 'n_tokens_neox': 855, 'n_words': 217}