Sha256: 17843e82df351757c554fa5c0ae5d218b3a4950d208ef2ec91a03aa2fbb3d444
Contents?: true
Size: 1.14 KB
Versions: 5
Compression:
Stored size: 1.14 KB
Contents
require 'simplecov' SimpleCov.start require 'resque' require 'sidekiq' require 'harness' require 'minitest/unit' require 'minitest/pride' require 'minitest/autorun' require 'webmock/minitest' WebMock.disable_net_connect! Harness.logger = Logger.new '/dev/null' Harness.redis = Redis::Namespace.new 'harness-test', :redis => Redis.connect(:host => 'localhost', :port => '6379') class IntegrationTest < MiniTest::Unit::TestCase def setup Harness.config.adapter = :memory Harness.config.queue = :syncronous gauges.clear ; counters.clear redis.flushall end def assert_gauge_logged(name) refute_empty gauges.select {|g| g.name = name }, "Expected #{gauges.inspect} to contain a #{name} result" end def assert_counter_logged(name) refute_empty counters.select {|c| c.name = name }, "Expected #{counters.inspect} to contain a #{name} result" end def gauges Harness::MemoryAdapter.gauges end def counters Harness::MemoryAdapter.counters end def redis Harness.redis end def instrument(name, data = {}) ActiveSupport::Notifications.instrument name, data do # nothing end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
harness-0.2.4 | test/test_helper.rb |
harness-0.2.3 | test/test_helper.rb |
harness-0.2.2 | test/test_helper.rb |
harness-0.2.1 | test/test_helper.rb |
harness-0.2.0 | test/test_helper.rb |