るりまサーチ

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.045秒)
トップページ > クエリ:gem[x] > クエリ:Error[x] > クエリ:minitest/unit[x]

別のキーワード

  1. logger error
  2. openssl error
  3. getoptlong error
  4. logger error?
  5. openssl error_string

検索結果

minitest/unit (38054.0)

ユニットテストを行うためのライブラリです。

...ユニットテストを行うためのライブラリです。

=== 使い方

minitest/unit
は以下のように使います。

テスト対象のソース (foo.rb) を用意します。

class Foo
def foo
"foo"
end
def bar
"foo"
end
end

次にユニットテス...
...n 0.000940 seconds.

1) Failure:
test_bar(TestFoo) [test_foo.rb:20]:
Expected "bar", not "foo".

2 tests, 2 assertions, 1 failures, 0 errors, 0 skips

test_bar だけテストしたい場合は以下のようなオプションを与えます。

$ ruby test_foo.rb -n test_bar
Loade...
...れます。

そうではなくて require 'minitest/unit' する場合は、テストクラスの定義時に親クラスを
MiniTest::Unit::TestCase にしなければなりません。

=== 注意

このライブラリは 2.2.0 で bundled gem(gemファイルのみを同梱)になりました...

test/unit (30.0)

ユニットテストを行うためのライブラリです。

...ユニットテストを行うためのライブラリです。

このライブラリは 2.2.0 からbundled gem(gemファイルのみを同梱)になりまし
た。詳しい内容は下記のプロジェクトページを参照してください。

* Test::Unit - Ruby用単体テストフレ...
...ームワーク: https://test-unit.github.io/

なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある訳ではありません。

Rubyのテスティングフレームワーク...
...Failure:
test_bar(TC_Foo) [test_foo.rb:16]:
<"bar"> expected but was
<"foo">.

2 tests, 2 assertions, 1 failures, 0 errors, 0 skips

test_bar だけテストしたい場合は以下のようなオプションを与えます。

$ ruby test_foo.rb --name test_b...