Module: Magik::Testing

Defined in:
lib/magik/testing.rb

Overview

The test DSL, compiling to Minitest (never RSpec), with auto-inferred factories and a parallel runner.

Implements: Phase 9 — Testing of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

* `test :Name do it "..." do expect(...) end end`
* `helpers: perform_action, render_screen, concurrently(n), travel_to`
* `helpers: assert_enqueued, assert_broadcast, assert_notified`
* `parallel: one Ractor per test file group, workers: :auto, transactional rollback per test`
* `magik test, magik test --watch, magik test --changed`

Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.

See Also:

Constant Summary collapse

SPEC_PHASE =

The build-spec phase this subsystem implements.

Returns:

  • (String)
"Phase 9 — Testing"
DSL_SURFACE =

The DSL this subsystem will expose, verbatim from the spec.

Returns:

  • (Array<String>)
[
  "test :Name do it \"...\" do expect(...) end end",
  "helpers: perform_action, render_screen, concurrently(n), travel_to",
  "helpers: assert_enqueued, assert_broadcast, assert_notified",
  "parallel: one Ractor per test file group, workers: :auto, transactional rollback per test",
  "magik test, magik test --watch, magik test --changed"
].freeze
STATUS =

Implementation status of this subsystem.

Returns:

  • (String)
"Not implemented — spec only"

Class Method Summary collapse

Class Method Details

.define(*_args, **_options) ⇒ void

This method returns an undefined value.

Entry point for the Testing DSL.

Parameters:

  • _args (Array)

    ignored

  • _options (Hash)

    ignored

Raises:

  • (NotImplementedError)

    always, until Phase 9 lands



47
48
49
# File 'lib/magik/testing.rb', line 47

def self.define(*_args, **_options)
  raise NotImplementedError, "Magik::Testing is spec-only; see docs/idea/00-build-spec.md"
end