Sha256: c5f7d7d6b48790f5cd055707cddad15061ff3b02751f01dc88537de539f83a68

Contents?: true

Size: 762 Bytes

Versions: 6

Compression:

Stored size: 762 Bytes

Contents

require "spec_helper"

describe Hitimes::Metric do
  before( :each ) do
    @metric = Hitimes::Metric.new( "testing" )
  end

  it 'has a name' do
    @metric.name.should be == "testing"
  end

  it "has associated data from initialization" do
    m = Hitimes::Metric.new( "more-data", 'foo' => 'bar', 'this' => 'that' )
    m.additional_data['foo'].should be == 'bar'
    m.additional_data['this'].should be == 'that'
    
    m = Hitimes::Metric.new( "more-data", { 'foo' => 'bar', 'this' => 'that' } )
    m.additional_data['foo'].should be == 'bar'
    m.additional_data['this'].should be == 'that'
  end

  it "initially has no sampling times" do
    @metric.sampling_start_time.should be == nil
    @metric.sampling_stop_time.should be == nil
  end
end

 

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
hitimes-1.2.1-java spec/metric_spec.rb
hitimes-1.2.1-x86-mswin32 spec/metric_spec.rb
hitimes-1.2.1 spec/metric_spec.rb
hitimes-1.2.0-x86-mswin32 spec/metric_spec.rb
hitimes-1.2.0-java spec/metric_spec.rb
hitimes-1.2.0 spec/metric_spec.rb