Sha256: b600748d8ab19fe78cb29c068ac5384583ddeb68055dab909572bff257d94338

Contents?: true

Size: 435 Bytes

Versions: 29

Compression:

Stored size: 435 Bytes

Contents

require 'spec_helper'
require 'roqua/support/stats'

describe 'Stats' do
  let(:backend) { double("StatsBackend") }
  let(:stats)   { Roqua::Support::Stats.new(backend) }

  before do
    Roqua.appname = 'appname'
  end

  describe 'tracking a value' do
    it 'reports to backend' do
      expect(backend).to receive(:submit).with('appname.data_export.duration', 2.3)
      stats.submit('data_export.duration', 2.3)
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
roqua-support-0.1.25 spec/roqua/support/stats_spec.rb
roqua-support-0.1.24 spec/roqua/support/stats_spec.rb
roqua-support-0.1.23 spec/roqua/support/stats_spec.rb
roqua-support-0.1.22 spec/roqua/support/stats_spec.rb
roqua-support-0.1.21 spec/roqua/support/stats_spec.rb
roqua-support-0.1.20 spec/roqua/support/stats_spec.rb
roqua-support-0.1.19 spec/roqua/support/stats_spec.rb
roqua-support-0.1.18 spec/roqua/support/stats_spec.rb
roqua-support-0.1.17 spec/roqua/support/stats_spec.rb