Sha256: 8b26b0a9da31e6dd8fe9ae33e9bd65fea49313b8f44454ac0a469c57aaf57ef9

Contents?: true

Size: 689 Bytes

Versions: 40

Compression:

Stored size: 689 Bytes

Contents

require 'spec_helper'

describe LitmusPaper::Metric::BigBrotherService do
  describe "#current_health" do
    it "returns the aggregate health of a Big Brother service." do
      Net::HTTP.should_receive(:get).
        with('127.0.0.1', '/cluster/service', 9292).
        and_return('Running: true\nCombinedWeight: 300\n')

      big_brother = LitmusPaper::Metric::BigBrotherService.new('service')
      big_brother.current_health.should == 300
    end
  end

  describe "#to_s" do
    it "is the check name and the service name" do
      cpu_load = LitmusPaper::Metric::BigBrotherService.new('service')
      cpu_load.to_s.should == "Metric::BigBrotherService(service)"
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
litmus_paper-1.6.2 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.6.1 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.6.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.5.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.4.2 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.4.1 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.3.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.2.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.1.1 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.1.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-1.0.0 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.9 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.7 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.6 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.5 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.4 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.3 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.2 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.1 spec/litmus_paper/metric/big_brother_service_spec.rb
litmus_paper-0.9.0 spec/litmus_paper/metric/big_brother_service_spec.rb