jam-cloud/ruby/spec/jam_ruby/lib/stats_spec.rb

32 lines
492 B
Ruby
Raw Permalink Normal View History

2014-12-30 23:10:16 +00:00
require 'spec_helper'
describe Stats do
before(:each) do
Stats.client = nil
end
after(:all) do
Stats.client = nil
end
describe "not-inited" do
it "write" do
Stats.write('bleh', time: Time.now.to_i)
end
end
describe "inited" do
before(:each) do
Stats.init(influxdb_database: 'test')
end
it "write" do
# this can't pass unless there is an actual db listening
Stats.write('bleh', time: Time.now.to_i)
end
end
end