Sha256: 043204780b63c5d42c9591ba480854634a9085d5b30b16d57c421dbcfb16c625

Contents?: true

Size: 762 Bytes

Versions: 26

Compression:

Stored size: 762 Bytes

Contents

describe Bluepill::ProcessStatistics do
  before(:each) do
    @stats = Bluepill::ProcessStatistics.new
  end

  it "should record events" do
    @stats.record_event('some event', 'some reason')
    @stats.record_event('another event', 'another reason')
    @stats.events.should have(2).events
  end

  it "should record #EVENTS_TO_PERSIST events" do
    (2 * Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).times do
      @stats.record_event('some event', 'some reason')
    end
    @stats.events.should have(Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).events
  end

  it "should return event history" do
    @stats.record_event('some event', 'some reason')
    @stats.to_s.should match(/some reason/)
    @stats.to_s.should match(/event history/)
  end
end

Version data entries

26 entries across 26 versions & 5 rubygems

Version Path
bluepill-rwgps-0.0.63 spec/lib/bluepill/process_statistics_spec.rb
bluepill-rwgps-0.0.62 spec/lib/bluepill/process_statistics_spec.rb
bluepill-rwgps-0.0.61 spec/lib/bluepill/process_statistics_spec.rb
cloud66-bluepill-0.0.64 spec/lib/bluepill/process_statistics_spec.rb
bluepill-rwgps-0.0.60 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.66 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.65 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.64 spec/lib/bluepill/process_statistics_spec.rb
cloud66-bluepill-0.0.63 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.63 spec/lib/bluepill/process_statistics_spec.rb
cloud66-bluepill-0.0.62 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.62 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.61 spec/lib/bluepill/process_statistics_spec.rb
kostya-bluepill-0.0.60.3 spec/lib/bluepill/process_statistics_spec.rb
kostya-bluepill-0.0.60.2 spec/lib/bluepill/process_statistics_spec.rb
kostya-bluepill-0.0.60.1 spec/lib/bluepill/process_statistics_spec.rb
skalar-bluepill-0.0.60.1 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.60 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.59 spec/lib/bluepill/process_statistics_spec.rb
bluepill-0.0.58 spec/lib/bluepill/process_statistics_spec.rb