Changelog

View Source

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[0.2.1] - 2026-07-27

Fixed

  • Restored the pre-0.2.0 step syntax. 0.2.0 replaced the implicit-context macros with explicit-context forms and removed the originals, breaking every project that had not migrated. Both forms now coexist — they are distinct arities, so no call site is ambiguous:

    pre-0.2.0 (restored)0.2.0 (still works)
    scenario "x", context doscenario "x" do
    given_ "y" do … endgiven_ "y", context do … {:ok, ctx} end
    same for when_, and_, then_same for when_, and_, then_

    Implicit-context steps run their block for side effects and pass context through unchanged; they are not required to return {:ok, context}.

    If you are on 0.2.0, upgrade to 0.2.1 — there is no reason to stay.

Added

  • test/spex/legacy_syntax_spex.exs pinning both syntaxes, so the old forms cannot be dropped again without a failing test.

[0.2.0] - 2026-07-27

Added

  • Reusable givensSexySpex.Givens with register_given/3. Shared givens become public functions on the defining module and are pulled into a spex file with a plain Elixir import.
  • Boundary enforcementboundary dependency and the Mix.Tasks.Compile.Spex compiler, so spex files are checked against public interfaces at compile time. See docs/BOUNDARY_ENFORCEMENT.md.
  • Stale spex runsmix spex --stale runs only spex files that changed or that reference changed modules; --force resets the tracking manifest.
  • JSONL failure outputmix spex --jsonl [PATH] writes failures as JSONL (defaults to spex_failures.jsonl) for machine consumption.
  • Custom formattersmix spex --formatter to swap the ExUnit formatter.
  • Error log crash detection — spex runs surface crashes reported through the error logger rather than silently passing.
  • --trace and --slowest N passthrough to ExUnit.

Changed

  • BREAKING: context is passed as a function argument, matching ExUnit style, instead of being threaded implicitly. Step bodies now take an explicit context argument and return {:ok, context}.
  • Output is quiet by default. The previous detailed Reporter output now requires --verbose.

Fixed

  • Modifier keys use atoms rather than strings.

[0.1.0] - 2024-07-06

Added

  • Initial release of Spex framework
  • Given-When-Then DSL for executable specifications
  • Built on ExUnit with AI-optimized features
  • Spex.Helpers module with semantic helper functions
  • mix spex command for running specifications
  • Manual mode with interactive step-by-step execution
  • Built-in support for Scenic GUI testing
  • Context flow between test steps
  • Framework setup helpers for application lifecycle management
  • Comprehensive documentation and examples

Features

  • Core DSL: spex, scenario, given_, when_, then_, and_ macros
  • Semantic Helpers: start_scenic_app/2, can_connect_to_scenic_mcp?/1, application_running?/1
  • Manual Mode: Interactive testing with IEx shell integration
  • Mix Integration: Dedicated mix spex command with proper lifecycle management
  • GUI Testing: Built-in helpers for Scenic applications with MCP server integration
  • Documentation: Comprehensive guides in /docs directory

Architecture

  • Built on ExUnit for reliability and compatibility
  • Controlled execution environment via mix spex only
  • Automatic compilation and application lifecycle management
  • Clean separation between framework and user code