Files
simply_based/spec/store_contract_spec.rb
T
bterkuileandClaude Sonnet 5 9ce5aea23d Add real concurrency coverage and actually run the adapter contract
- spec/support/adapter_contract.rb shipped shared examples ('a simply_couch
  adapter') that no spec ever included — the parity proof they document never
  ran. store_contract_spec.rb now includes them against the live Store.
- concurrency_spec.rb: the suite had zero multi-threaded examples despite the
  gem's core claims being CAS optimistic concurrency and Redis-replacement
  primitives. Adds: counter increments under 8 concurrent writers, lock
  granted to exactly one contender, with_lock mutual exclusion, stale-handle
  release after TTL expiry (must not unlock the new holder), same-attribute
  CAS conflict surfacing (no lost update), different-attribute auto-merge, and
  a 3-thread disjoint-attribute write storm.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-06 18:42:17 -05:00

9 lines
336 B
Ruby

require 'spec_helper'
# The adapter contract shared examples (spec/support/adapter_contract.rb) were
# shipped with the gem but never actually included by any spec — the parity
# proof they document did not run. This spec makes the Store honour it.
RSpec.describe SimplyBased::Store do
it_behaves_like 'a simply_couch adapter'
end