Skip to content
This repository has been archived by the owner on Dec 8, 2023. It is now read-only.

Commit

Permalink
Tracker unit tests (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
mike-swart authored and Chance Feick committed Jun 23, 2017
1 parent e532ed7 commit 018b86f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions test/unit/rack/tracker_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,23 @@ def test_suite_configured
ENV.delete('LIBRATO_SUITES')
end

def test_rack_process_queued
ENV['LIBRATO_SUITES'] = 'all'
tracker = Tracker.new(Configuration.new)
refute_nil tracker.queued[:measurements]
refute_nil tracker.queued[:measurements].detect { |measurement| measurement[:name] == 'rack.processes' }
ensure
ENV.delete('LIBRATO_SUITES')
end

def test_rack_process_not_queued
ENV['LIBRATO_SUITES'] = 'none'
tracker = Tracker.new(Configuration.new)
assert_nil tracker.queued[:measurements]
ensure
ENV.delete('LIBRATO_SUITES')
end

private

def buffer_lines
Expand Down

0 comments on commit 018b86f

Please sign in to comment.