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 endhelpers: perform_action, render_screen, concurrently(n), travel_tohelpers: assert_enqueued, assert_broadcast, assert_notifiedparallel: one thread per test file group, workers: :auto, transactional rollback per testmagik test, magik test --watch, magik test --changed
A worker is a thread, and there is exactly one worker model. TruffleRuby's
threads are genuinely parallel — that is why it is the production runtime — and
it implements no fork, so there is no forked worker to fall back to
(docs/architecture/12-runtime-verification.md).
Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.
Constant Summary collapse
- SPEC_PHASE =
The build-spec phase this subsystem implements.
"Phase 9 — Testing"- DSL_SURFACE =
The DSL this subsystem will expose, verbatim 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 thread 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.
"Not implemented — spec only"
Class Method Summary collapse
-
.define(*_args, **_options) ⇒ void
Entry point for the Testing DSL.
Class Method Details
.define(*_args, **_options) ⇒ void
This method returns an undefined value.
Entry point for the Testing DSL.
52 53 54 |
# File 'lib/magik/testing.rb', line 52 def self.define(*_args, **) raise NotImplementedError, "Magik::Testing is spec-only; see docs/idea/00-build-spec.md" end |