spec/spec_helper.rb in sidekiq-datadog-0.4.1 vs spec/spec_helper.rb in sidekiq-datadog-0.5.0

- old
+ new

@@ -1,17 +1,21 @@ ENV['RACK_ENV'] ||= 'test' - -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) - require 'sidekiq-datadog' module Mock class Worker end class Statsd < ::Datadog::Statsd - def timing(stat, ms, opts={}); super(stat, 333, opts); end - def send_stat(message); written.push(message); end - def written; @written ||= []; end + def timing(stat, _millis, opts={}) + super(stat, 333, opts) + end + + def send_stat(message) + messages.push message + end + + def messages + @messages ||= [] + end end end