Checkpoint commit, start sketching out MDBX::Database.
FossilOrigin-Name: 92f55b2d6cc9652cb9cb67e69588ed0f4f155086a5a160aae68a1f22e9114314
This commit is contained in:
parent
6a7bfb722f
commit
37b8091690
11 changed files with 600 additions and 8 deletions
BIN
spec/data/testdb/mdbx.dat
Normal file
BIN
spec/data/testdb/mdbx.dat
Normal file
Binary file not shown.
0
spec/data/testdb/mdbx.lck
Normal file
0
spec/data/testdb/mdbx.lck
Normal file
|
|
@ -8,11 +8,19 @@ if ENV[ 'COVERAGE' ]
|
|||
SimpleCov.start
|
||||
end
|
||||
|
||||
require 'pathname'
|
||||
require 'rspec'
|
||||
require 'mdbx'
|
||||
|
||||
|
||||
module MDBX::Testing
|
||||
TEST_DATABASE = Pathname( __FILE__ ).parent.parent + 'data' + 'testdb'
|
||||
end
|
||||
|
||||
|
||||
RSpec.configure do |config|
|
||||
include MDBX::Testing
|
||||
|
||||
config.expect_with :rspec do |expectations|
|
||||
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
||||
expectations.syntax = :expect
|
||||
|
|
@ -32,7 +40,7 @@ RSpec.configure do |config|
|
|||
config.run_all_when_everything_filtered = true
|
||||
# config.warnings = true
|
||||
|
||||
# config.include( Zyre::Testing )
|
||||
config.include( MDBX::Testing )
|
||||
# config.include( Loggability::SpecHelpers )
|
||||
end
|
||||
|
||||
|
|
|
|||
13
spec/mdbx/database_spec.rb
Normal file
13
spec/mdbx/database_spec.rb
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#!/usr/bin/env rspec -cfd
|
||||
|
||||
require_relative '../lib/helper'
|
||||
|
||||
|
||||
RSpec.describe( MDBX::Database ) do
|
||||
|
||||
it "disallows direct calls to #new" do
|
||||
expect{ described_class.new }.
|
||||
to raise_exception( NoMethodError, /private/ )
|
||||
end
|
||||
end
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue