Sha256: ed8d7b8df9ebefa74c345ea72b47bdc0f693c20837223b22cec8c7ee06e4de42
Contents?: true
Size: 1.23 KB
Versions: 5
Compression:
Stored size: 1.23 KB
Contents
# Author:: Couchbase <info@couchbase.com> # Copyright:: 2011, 2012 Couchbase, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require File.join(File.dirname(__FILE__), 'setup') class TestStats < MiniTest::Test def test_trivial_stats_without_argument stats = cb.stats assert stats.is_a?(Hash) assert stats.has_key?("pid") key, info = stats.first assert key.is_a?(String) assert info.is_a?(Hash) assert_equal 1, info.size end def test_stats_with_argument stats = cb.stats("memory") assert stats.is_a?(Hash) assert stats.has_key?("mem_used") key, info = stats.first assert key.is_a?(String) assert info.is_a?(Hash) assert_equal 1, info.size end end
Version data entries
5 entries across 5 versions & 1 rubygems