18件ヒット
[1-18件を表示]
(0.020秒)
種類
- 文書 (15)
- インスタンスメソッド (1)
- ライブラリ (1)
- 特異メソッド (1)
ライブラリ
-
minitest
/ unit (1) -
test
/ unit (1)
モジュール
-
MiniTest
:: Assertions (1) -
Test
:: Unit (1)
キーワード
-
NEWS for Ruby 3
. 0 . 0 (4) -
minitest
/ unit (1) -
ruby 1
. 8 . 4 feature (11) -
setup
_ argv (1)
検索結果
先頭5件
-
MiniTest
:: Assertions # skip(message = nil , backtrace = caller) (21119.0) -
このメソッドを呼び出したテストメソッドをスキップします。
...ます。
@param message メッセージを指定します。
@param backtrace 例外発生時のスタックトレースで、Kernel.#caller の戻り値と同じ
形式で指定しなければいけません。
@raise MiniTest::Skip 必ず発生します。
@see Kernel.#raise... -
minitest
/ unit (6132.0) -
ユニットテストを行うためのライブラリです。
...ラリです。
=== 使い方
minitest/unit は以下のように使います。
テスト対象のソース (foo.rb) を用意します。
class Foo
def foo
"foo"
end
def bar
"foo"
end
end
次にユニットテスト (test_foo.rb) を書きます。
テストを......前はすべて "test" で始まる必要があります。
テストメソッドが実行される前には setup メソッドが必ず実行されます。
テストメソッドが実行された後には teardown メソッドが必ず実行されます。
minitest/unit を Kernel.#require した......が実行されます。
$ 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 だけテストしたい場... -
Test
:: Unit . setup _ argv(original _ argv = ARGV) { |files| . . . } -> [String] (3042.0) -
original_argvで指定されたオプションを解析して、テスト対象になるファイル をrequireします。
...にあるtest_*.rbを全てrequireします。
このメソッド自体は、オプションを解析してrequireを行う以外の処理は行いま
せんが、test/unit.rbをrequireして呼び出すメソッドのため、結果的にユニッ
トテストが実行されます。testrbコマ......使えます。なお、--name=test_fooのような指定は行えません。--name test_foo
のように指定してください。
: -x
指定されたファイルを除外します。ファイルの指定に正規表現も使えます。
: -s, --seed
Kernel.#rand の乱数の種を指定......, --hide-skip
スキップしたテストを表示しません。
: -I
ライブラリのロードパスに指定した値を追加します。
: --gc-stress
GC.stress に true を設定します。
: --no-gc-stress
GC.stress に false を設定します。
===== 注意
Test::Unit.s... -
ruby 1
. 8 . 4 feature (264.0) -
ruby 1.8.4 feature ruby 1.8.4 での ruby 1.8.3 からの変更点です。
...ruby 1.8.4 feature/printf [bug]>))
* ((<ruby 1.8.4 feature/Hash [bug]>))
* ((<ruby 1.8.4 feature/test [bug]>))
* ((<ruby 1.8.4 feature/File.identical? [new]>))
* ((<ruby 1.8.4 feature/FileTest.identical? [new]>))
* ((<ruby 1.8.4 feature/File.split [change]>))
* ((<ruby 1.8.4 feature/File......from Kernel method.
#
# * eval.c (exec_under): frame during eval should preserve external
# information.
: super [bug]
Kernelのメソッド内でsuperを呼んだ時に、存在しないsuperclass
にアクセスしようとするバグの修正。
module Kernel......tical? [new]
: FileTest.identical? [new]
test(?-, ...) の代替メソッドとして追加。
: File.split [change]
: File.basename [change]
: File.dirname [change]
#Tue Nov 22 14:46:57 2005 NAKAMURA Usaku <usa@ruby-lang.org>
#
# * file.c (rb_file_s_basename): skip slashes just after... -
NEWS for Ruby 3
. 0 . 0 (96.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...`true` will cause compaction to occur during major collections. At the moment, compaction adds significant overhead to major collections, so please test first! 17176
* Hash
* Hash#transform_keys and Hash#transform_keys! now accept a hash that maps keys to new keys. 16274
* Hash#except h......wait(io, events, timeout)` in a non-blocking execution context. 16786
* Kernel
* Kernel#clone when called with the `freeze: false` keyword will call `#initialize_clone` with the `freeze: false` keyword. 14266
* Kernel#clone when called with the `freeze: true` keyword will call `#initialize......et
* Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the s...