るりまサーチ

最速Rubyリファレンスマニュアル検索!
14件ヒット [1-14件を表示] (0.007秒)
トップページ > クエリ:assert[x] > 種類:ライブラリ[x]

別のキーワード

  1. mkmf try_static_assert
  2. kernel try_static_assert
  3. try_static_assert mkmf
  4. try_static_assert kernel
  5. power_assert

キーワード

検索結果

power_assert (6035.0)

Ruby向けのPower Assertを提供するライブラリです。

...Ruby向けのPower Assertを提供するライブラリです。

このライブラリはbundled gem(gemファイルのみを同梱)です。詳しい内容は下
記のページを参照してください。

* rubygems.org: https://rubygems.org/gems/power_assert
* プロジェクトページ: h...
...ttps://github.com/k-tsj/power_assert
* リファレンス: https://www.rubydoc.info/gems/power_assert...

minitest/unit (13.0)

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

...ew
end
# teardown はあまり使わない
def teardown
@foo = nil
end

def test_foo
assert
_equal "foo", @foo.foo
end

def test_bar
assert
_equal "bar", @foo.bar
end
end

または MiniTest::Unit.autorun を省略して以下のように書く...
...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_...
...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 のみ提供されています。
またヘルプを表示すること...

test/unit (13.0)

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

...stCase
def setup
@obj = Foo.new
end

# def teardown
# end

def test_foo
assert
_equal("foo", @obj.foo)
end
def test_bar
assert
_equal("bar", @obj.bar)
end
end

テストを実行するには上で用意した test_foo.rb を...
...23 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

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

$ ruby...
...Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirectory Add library load path
--[no-]gc-stress Set GC.stress as true

複数のテストを一度に行う場合、以下のように書いた...