るりまサーチ

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.188秒)
トップページ > クエリ:-[x] > クエリ:u[x] > クエリ:skips[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method gets
  4. irb/input-method new
  5. matrix -

ライブラリ

クラス

キーワード

検索結果

MiniTest::Unit#skips -> Fixnum (21301.0)

実行しなかったテストケース数を返します。

実行しなかったテストケース数を返します。

test/unit (6132.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のテスティングフレームワークの歴史については以下が詳しくまとまっています。

* Rubyのテスティング...
...$ ruby test_foo.rb

Loaded suite test_foo
Started
F.
Finished in 0.022223 seconds.

1) Failure:
test_bar(TC_Foo) [test_foo.rb:16]:
<"bar"> expected but was
<"foo">.

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

tes...

minitest/unit (6030.0)

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

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

=== 使い方

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

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

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

次にユニットテス...
...トが実行されます。

$ ruby test_foo.rb
Loaded suite test_foo
Started
F.
Finished in 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
Loaded suite test_foo
Started
F
Finished in 0.000820 seconds.

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

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

コンソールを使った testrunner のみ...