Sha256: 4105bc8124017ac2696ba4b7b5ffbd73226417584b21569ad5e8e114af426089
Contents?: true
Size: 470 Bytes
Versions: 3
Compression:
Stored size: 470 Bytes
Contents
require 'rspec' require 'mongodb/graphite/agent/op_counters_sample' describe 'OpCounters' do it 'should reload last sample' do current_sample = Mongodb::Graphite::Agent::OpCountersSample.new(100) File.open('lastsample-test', 'w') do |file| Marshal.dump(current_sample, file) end File.open('lastsample-test', 'r') do |file| previous_sample = Marshal.load(file) previous_sample.values.should eq(100) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
mongodb-graphite-agent-0.1.4 | spec/op_counters_sample_spec.rb |
mongodb-graphite-agent-0.1.3 | spec/op_counters_sample_spec.rb |
mongodb-graphite-agent-0.1.2 | spec/op_counters_sample_spec.rb |