diff --git a/README.md b/README.md index d4221e8..27e9e6c 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,12 @@ mighty_test (`mt`) is a TDD-friendly Minitest runner for Ruby projects. It inclu **Features** -- [⚙️ CI Mode](#%EF%B8%8F-ci-mode) -- [🧑‍🔬 Watch Mode](#-watch-mode) -- [🔬 Focus Mode](#-focus-mode) -- [🛑 Fail Fast](#-fail-fast) -- [🚥 Color Output](#-color-output) -- [💬 More Options](#-more-options) +- ⚙️ [CI Mode](#%EF%B8%8F-ci-mode) +- 🧑‍🔬 [Watch Mode](#-watch-mode) +- 🔬 [Focus Mode](#-focus-mode) +- 🛑 [Fail Fast](#-fail-fast) +- 🚥 [Color Output](#-color-output) +- 💬 [More Options](#-more-options) **Community** @@ -50,26 +50,6 @@ Now you can run mighty_test with `bin/mt`. > [!TIP] > **When installing mighty_test in a Rails project, make sure to put the gem in the `:test` Gemfile group.** Although Rails has a built-in test runner (`bin/rails test`) that already provides a lot of what mighty_test offers, you can still use `bin/mt` with Rails projects for its unique `--watch` mode and CI `--shard` feature. -## Rake Integration (Non-Rails) - -For non-Rails projects, `rake test` is the popular convention for running tests. To provide an easy migration path to `mt`, you can make the following change to your Rakefile. - -First, remove any existing `Rake::TestTask` from your Rakefile. Then add the following snippet: - -```ruby -require "shellwords" - -desc "Run all tests, excluding slow tests" -task :test do - sh "bin/mt", *Shellwords.split(ENV["TESTOPTS"] || ""), "--", *Array(ENV["TEST"]), -end - -desc "Run all tests, slow tests included" -task :"test:all" do - sh "bin/mt", "--all", *Shellwords.split(ENV["TESTOPTS"] || "") -end -``` - ## Requirements mighty_test requires modern versions of Minitest and Ruby. @@ -253,14 +233,11 @@ bin/mt --verbose bin/mt --help ``` -When using the Rake integration, Rake-style test environment variables still work. These are equivalent: +If you have Minitest extensions installed, like [minitest-snapshots](https://github.com/mattbrictson/minitest-snapshots), the command line options of those extensions are supported as well. ```sh -# Rake style -rake test TEST=test/commands/init_test.rb TESTOPTS=--verbose - -# CLI style -bin/mt --verbose test/commands/init_test.rb +# Update snapshots +bin/mt -u ``` ## Support