Sha256: 1948064d326d13655d0535c68d0d074ad00bcc14519f52cd96dd61ccd22cc471

Contents?: true

Size: 769 Bytes

Versions: 2

Compression:

Stored size: 769 Bytes

Contents

require "spec_helper"

module Healthety
  module TestHelper
    def test; end
  end

  describe Healthety do
    $stdout = StringIO.new
    Thread.any_instance.stubs(:join)
    UDPSocket.any_instance.stubs(:send)

    it "should start" do
      expect do
        Healthety.workers do
          host "localhost"
          port 41234

          worker :test do
            interval 0.5
            value rand(10)
          end
        end
      end.to be_true
    end

    it "should inclde helpers" do
      Healthety.helpers TestHelper

      expect do
        Healthety.workers do
          host "localhost"
          port 41234

          worker :test do
            interval 0.5
            value test
          end
        end
      end.to be_true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
healthety-0.0.7 spec/unit/healthety_spec.rb
healthety-0.0.6 spec/unit/healthety_spec.rb