LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

minitest

testing framework for Ruby that provides a complete suite of testing facilities

TLDR

Run all tests
$ ruby -Ilib:test [test/test_*.rb]
copy
Run specific test file
$ ruby -Ilib:test [test/test_example.rb]
copy
Run tests with verbose output
$ ruby -Ilib:test [test/test_example.rb] --verbose
copy
Run specific test method
$ ruby -Ilib:test [test/test_example.rb] --name [test_method_name]
copy
Run with pattern
$ ruby -Ilib:test [test/test_example.rb] --name /[pattern]/
copy

SYNOPSIS

ruby -Ilib:test testfile [options_]

DESCRIPTION

Minitest is a testing framework for Ruby that provides a complete suite of testing facilities. It includes unit tests, specs, mocking, and benchmarking.Minitest is bundled with Ruby and is known for being fast and simple.

PARAMETERS

--verbose

Verbose output.
--name pattern
Run matching tests.
--seed n
Random seed.
--pride
Rainbow output.

TEST EXAMPLE

$ require 'minitest/autorun'

class TestExample < Minitest::Test
  def setup
    @value = 1
  end

  def test_addition
    assert_equal 2, @value + 1
  end
end
copy

SPEC SYNTAX

$ describe Example do
  it "works" do
    _(1 + 1).must_equal 2
  end
end
copy

CAVEATS

Bundled with Ruby since 1.9. Tests run in random order by default. Fewer features than RSpec but faster.

HISTORY

Minitest was created by Ryan Davis (zenspider) as a minimal testing framework, included in Ruby's standard library since Ruby 1.9.

SEE ALSO

rspec(1), rake(1), ruby(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid