require 'pry' require 'simply_based' require 'couchbase' require 'fixtures/couch' COUCHBASE_URL = ENV.fetch( 'COUCHBASE_URL', 'couchbase://Administrator:password@localhost/simply_based_test' ) Dir.glob('spec/support/**/*.rb').each { |f| require f.sub(%r{^spec/}, '') } RSpec.configure do |config| config.expect_with(:rspec) { |c| c.syntax = [:expect, :should] } config.color = true config.filter_run_excluding :couchdb_only # CouchDB-mechanic specs with no Couchbase equivalent # Reverse lookups into embedded documents (querying a foreign key held # *inside* an embedded array element) are not implemented on Couchbase — # they would need an UNNEST-based query path. Documented gap. config.filter_run_excluding :embedded_in_reverse_lookup config.before(:suite) do SimplyBased.database_url = COUCHBASE_URL SimplyBased.database.create_database! # primary index end config.before(:each) do $performed_queries = [] SimplyBased.database_url = COUCHBASE_URL SimplyBased.database.drop_database! # clear documents between examples end end