るりまサーチ

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

別のキーワード

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

オブジェクト

キーワード

検索結果

<< 1 2 3 ... > >>

Kernel.#test(cmd, file) -> bool | Time | Integer | nil (18241.0)

単体のファイルでファイルテストを行います。

...する
: ?z
ファイルサイズが 0 である
: ?s
ファイルサイズが 0 でない (ファイルサイズを返す、0 ならば nil) -> Integer|nil
: ?f
ファイルはプレーンファイルである
: ?d
ファイルはディレクトリである
: ?l
ファイルは...
...を返す -> Time
: ?A
ファイルの最終アクセス時刻を返す -> Time
: ?C
ファイルの inode 変更時刻を返す -> Time

//emlist[例][ruby]{
IO.write("testfile", "test")
test
("r", "testfile") # => true
test
("s", "testfile") # => 4
test
("M", "testfile") # => 2018-03-31 07:38...

Kernel.#test(cmd, file1, file2) -> bool (18226.0)

2ファイル間のファイルテストを行います。

...ル2より最終更新時刻が古い
: ?-
ファイル1とファイル2が同一のファイルである

//emlist[例][ruby]{
IO.write("testfile1", "test1")
IO.write("testfile2", "test2")
%w(= < > -).each do |e|
result = test(e, "testfile1", "testfile2")
puts "#{e}: #{result}"
end
//}

# =...
...> =: true
# => <: false
# => >: false
# => -: false...

Shell#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15229.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::CommandProcessor#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15229.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

Shell::Filter#test(command, file1, file2 = nil) -> bool | Time | Integer | nil (15229.0)

Kernel.#test や FileTest のメソッドに処理を委譲します。

...Kernel.#test や FileTest のメソッドに処理を委譲します。

@param command 数値、またはサイズが 1 の文字列の場合は Kernel.#test に処理委譲します。
2 文字以上の文字列の場合は FileTest のメソッドとして実行します。

@para...
...ell'
Shell.verbose = false
sh = Shell.new
begin
sh.mkdir("foo")
rescue
end
p sh[?e, "foo"] # => true
p sh[:e, "foo"] # => true
p sh["e", "foo"] # => true
p sh[:exists?, "foo"] # => true
p sh["exists?", "foo"] # => true

@see Kernel.#test, FileTest...

絞り込み条件を変える

MiniTest::Unit::TestCase.test_methods -> Array (12207.0)

テストメソッドのリストを返します。

...テストメソッドのリストを返します。

MiniTest::Unit::TestCase.test_order の値が :random である場合は
返されるメソッドリストの順番はランダムです。
そうでない場合は、文字コード順にソートされます。...

MiniTest::Unit::TestCase.test_order -> Symbol (12201.0)

テストの実行順序を返します。

テストの実行順序を返します。

デフォルトはランダムです。

MiniTest::Unit::TestCase.test_suites -> Array (12201.0)

テストクラス名のリストを返します。

テストクラス名のリストを返します。

MiniTest::Unit#run_test_suites(filter = /./) -> Array (9201.0)

全てのテストを実行します。

全てのテストを実行します。

@param filter 実行するテストメソッド名を正規表現で指定します。

@return テストケース数とアサーション数を返します。

MiniTest::Unit#test_count -> Fixnum (9201.0)

テストケース数を返します。

テストケース数を返します。

絞り込み条件を変える

test/unit (6318.0)

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

...参照してください。

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

なお、2.2.0より前のtest/unit は当時バンドルしていた minitest/unit を使って再実装し
ていましたが、上記のtest/unitと完全な互換性がある...
...ングフレームワークの歴史(2014年版) https://www.clear-code.com/blog/2014/11/6.html
* RubyKaigi 2015:The history of testing framework in Ruby https://www.clear-code.com/blog/2015/12/12.html

=== 使い方

Test
::Unit は以下のように使います。

まずテスト対象の...
...foo"
end
def bar
"foo"
end
end

次にユニットテスト(test_foo.rb)を書きます。テストを実行するメソッド(テストメソッド)の名前は
全て test_ で始まる必要があります。テストメソッドが実行される前には setup...

OpenSSL::BN#prime_fasttest?(checks=nil, vtrivdiv=true) -> bool (6218.0)

自身が素数であるなら true を返します。

...真である場合には、 Miller-Rabin 法での
判定の前に小さな素数で割ることで素数か否かを
調べます。自身が小さな素数である場合にはこの手順
により素数ではないと誤った返り値を返します。

Miller-Rabin 法により確率的に判...
...require 'openssl'

# 181 は 「小さな素数」である
OpenSSL::BN.new("181").prime_fasttest?(nil, true) # => false
OpenSSL::BN.new("181").prime_fasttest?(nil, false) # => true
//}

@param checks Miller-Robin法の繰り返しの回数
@param vtrivdiv 真なら小さな素数で割ることで...

Gem::Specification#test_file -> String (6217.0)

Gem::Specification#test_files の単数バージョンです。

...Gem::Specification#test_files の単数バージョンです。...

Gem::Specification#test_suite_file -> String (6217.0)

この属性は非推奨です。 Gem::Specification#test_files を使用してください。

...この属性は非推奨です。 Gem::Specification#test_files を使用してください。...

Gem::Specification#has_test_suite? -> bool (6201.0)

このメソッドは非推奨です。 Gem::Specification#has_unit_tests? を使用してください。

...このメソッドは非推奨です。 Gem::Specification#has_unit_tests? を使用してください。...

絞り込み条件を変える

Gem::Specification#test_files -> [String] (6201.0)

ユニットテストのファイルのリストを返します。

ユニットテストのファイルのリストを返します。
<< 1 2 3 ... > >>