Sha256: b64216ef1d89e0aac37f69820c6ad5bd8046dd0d9d4d8c9365985e548e4e8adb

Contents?: true

Size: 742 Bytes

Versions: 29

Compression:

Stored size: 742 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.must_equal "testing"
  end

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

  it "initially has no sampling times" do
    @metric.sampling_start_time.must_be_nil
    @metric.sampling_stop_time.must_be_nil
  end
end

 

Version data entries

29 entries across 27 versions & 4 rubygems

Version Path
hitimes-1.3.1-x64-mingw32 spec/metric_spec.rb
hitimes-1.3.1-x86-mingw32 spec/metric_spec.rb
hitimes-1.3.1-java spec/metric_spec.rb
hitimes-1.3.1 spec/metric_spec.rb
hitimes-1.3.0-x64-mingw32 spec/metric_spec.rb
hitimes-1.3.0-x86-mingw32 spec/metric_spec.rb
hitimes-1.3.0-java spec/metric_spec.rb
hitimes-1.3.0 spec/metric_spec.rb
hitimes-1.2.6-x86-mingw32 spec/metric_spec.rb
hitimes-1.2.6-java spec/metric_spec.rb
hitimes-1.2.6 spec/metric_spec.rb
hitimes-1.2.5-java spec/metric_spec.rb
hitimes-1.2.5-x86-mingw32 spec/metric_spec.rb
hitimes-1.2.5 spec/metric_spec.rb
hitimes-1.2.4-java spec/metric_spec.rb
hitimes-1.2.4-x86-mingw32 spec/metric_spec.rb
hitimes-1.2.4 spec/metric_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/hitimes-1.2.2/spec/metric_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/hitimes-1.2.2/spec/metric_spec.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/hitimes-1.2.2/spec/metric_spec.rb