Sha256: fc42da8df7cee4fec3ebb5fb33ead22a589d4840a69efa5c0a30e0b18c0a37f5

Contents?: true

Size: 557 Bytes

Versions: 3

Compression:

Stored size: 557 Bytes

Contents

require File.dirname(__FILE__) + '/shared'

class TestTokyo < Test::Unit::TestCase
  context "An empty database" do
    setup do
      @storage = Metry::Storage.new('test')
      @storage.clear
    end
    
    should "be empty" do
      assert_equal 0, @storage.event_count
    end
    
    should "handle object ids" do
      v = @storage.new_visitor
      assert_equal v, @storage.visitor(v['_id'].to_s)
    end
    
    should "handle bad object ids" do
      assert_nothing_raised do
        assert_nil @storage.visitor('1')
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
metry-2.0.4 test/test_storage.rb
metry-2.0.5 test/test_storage.rb
metry-2.0.3 test/test_storage.rb