Sha256: 8d45ae937a786af0f2ad0d964265967804b0bfd10599b8f043d90d1671ea7824

Contents?: true

Size: 766 Bytes

Versions: 15

Compression:

Stored size: 766 Bytes

Contents

require File.expand_path(File.join(File.dirname(__FILE__), "..", "spec_helper.rb"))
require 'amalgalite/sqlite3'
require 'rbconfig'

describe "Amalgalite::SQLite3::Status" do
  it "knows how much memory it has used" do
    Amalgalite::SQLite3.status.memory_used.current.should >= 0
    Amalgalite::SQLite3.status.memory_used.highwater.should >= 0
  end

  it "can reset the highwater value" do
    before = Amalgalite::SQLite3.status.memory_used.highwater
    before.should > 0

    current = Amalgalite::SQLite3.status.memory_used.current
    Amalgalite::SQLite3.status.memory_used.reset!
    Amalgalite::SQLite3.status.memory_used.highwater.should == current

    after = Amalgalite::SQLite3.status.memory_used.highwater
    after.should_not eql(before)
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
amalgalite-1.1.2-x86-mingw32 spec/sqlite3/status_spec.rb
amalgalite-1.1.2-x86-mswin32 spec/sqlite3/status_spec.rb
amalgalite-1.1.2 spec/sqlite3/status_spec.rb
amalgalite-1.1.1-x86-mingw32 spec/sqlite3/status_spec.rb
amalgalite-1.1.1-x86-mswin32 spec/sqlite3/status_spec.rb
amalgalite-1.1.1 spec/sqlite3/status_spec.rb
amalgalite-1.0.0 spec/sqlite3/status_spec.rb
amalgalite-1.0.0-x86-mswin32 spec/sqlite3/status_spec.rb
amalgalite-1.0.0-x86-mingw32 spec/sqlite3/status_spec.rb
amalgalite-0.15.0-x86-mingw32 spec/sqlite3/status_spec.rb
amalgalite-0.15.0-x86-mswin32 spec/sqlite3/status_spec.rb
amalgalite-0.15.0 spec/sqlite3/status_spec.rb
amalgalite-0.12.0-x86-mingw32 spec/sqlite3/status_spec.rb
amalgalite-0.12.0 spec/sqlite3/status_spec.rb
amalgalite-0.12.0-x86-mswin32 spec/sqlite3/status_spec.rb