3469件ヒット
[1-100件を表示]
(0.060秒)
ライブラリ
- ビルトイン (1163)
- csv (120)
- erb (60)
- fileutils (36)
-
irb
/ inspector (12) - json (24)
-
json
/ add / exception (12) - logger (48)
-
minitest
/ mock (2) -
minitest
/ spec (4) -
minitest
/ unit (48) - mkmf (12)
-
net
/ http (36) -
net
/ imap (12) -
net
/ smtp (24) - objspace (12)
- openssl (12)
- optparse (72)
- pathname (36)
- rake (588)
-
rake
/ packagetask (12) -
rake
/ testtask (120) -
rubygems
/ server (12) -
rubygems
/ source _ index (12) -
rubygems
/ source _ info _ cache (72) -
rubygems
/ spec _ fetcher (12) -
rubygems
/ specification (60) - set (18)
- shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (12) - strscan (468)
- syslog (12)
-
test
/ unit (1) - tracer (12)
- uri (12)
- win32ole (24)
クラス
-
ARGF
. class (120) - Binding (7)
- CSV (120)
- Dir (12)
- ERB (60)
- Exception (44)
- File (168)
-
Gem
:: Server (12) -
Gem
:: SourceIndex (12) -
Gem
:: SourceInfoCache (72) -
Gem
:: SpecFetcher (12) -
Gem
:: Specification (60) - IO (104)
-
IRB
:: Inspector (12) - Logger (48)
- Method (12)
-
MiniTest
:: Mock (2) -
MiniTest
:: Spec (4) -
MiniTest
:: Unit (15) -
MiniTest
:: Unit :: TestCase (8) - Module (12)
-
Net
:: HTTPGenericRequest (36) -
Net
:: IMAP (12) -
Net
:: SMTP (24) -
OpenSSL
:: BN (12) - OptionParser (72)
- Pathname (36)
-
Rake
:: Application (60) -
Rake
:: FileList (216) -
Rake
:: FileTask (24) -
Rake
:: InvocationChain (48) -
Rake
:: PackageTask (12) -
Rake
:: TaskArguments (60) -
Rake
:: TestTask (120) - Set (24)
- Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - String (87)
- StringScanner (456)
- Thread (24)
- TracePoint (24)
- Tracer (12)
-
URI
:: Generic (12) - WIN32OLE (12)
-
WIN32OLE
_ VARIANT (12)
モジュール
- FileTest (318)
- FileUtils (36)
- GC (24)
-
Gem
:: InstallUpdateOptions (12) - JSON (12)
-
JSON
:: Generator :: GeneratorMethods :: String (12) - Kernel (177)
- MiniTest (2)
-
MiniTest
:: Assertions (23) - ObjectSpace (12)
- Rake (24)
-
Rake
:: Cloneable (24) -
Rake
:: TaskManager (120) - Syslog (12)
-
Test
:: Unit (1)
オブジェクト
- ENV (48)
キーワード
-
1
. 6 . 8から1 . 8 . 0への変更点(まとめ) (12) - << (24)
- == (12)
-
MINI
_ DIR (1) -
NEWS for Ruby 2
. 2 . 0 (11) -
NEWS for Ruby 2
. 7 . 0 (6) -
NEWS for Ruby 3
. 0 . 0 (5) -
NEWS for Ruby 3
. 1 . 0 (4) -
PASSTHROUGH
_ EXCEPTIONS (1) - Proc (12)
- Rubyの起動 (4)
- Ruby用語集 (12)
-
SUPPORTS
_ INFO _ SIGNAL (1) - StringScanner (12)
- VERSION (1)
- [] (66)
-
_ _ name _ _ (1) -
_ assertions (1) -
add
_ row (12) - after (1)
-
allocation
_ sourcefile (12) - append (24)
- application (12)
- assert (1)
-
assert
_ block (1) -
assert
_ empty (1) -
assert
_ equal (1) -
assert
_ in _ delta (1) -
assert
_ in _ epsilon (1) -
assert
_ includes (1) -
assert
_ instance _ of (1) -
assert
_ kind _ of (1) -
assert
_ match (1) -
assert
_ nil (1) -
assert
_ operator (1) -
assert
_ raises (1) -
assert
_ respond _ to (1) -
assert
_ same (1) -
assert
_ send (1) -
assert
_ throws (1) -
assertion
_ count (1) - atime (12)
- autorun (1)
-
backtrace
_ locations (36) - before (1)
-
beginning
_ of _ line? (12) - binmode (12)
- blockdev? (12)
- body (12)
-
body
_ stream (12) -
body
_ stream= (12) - bol? (12)
-
caller
_ locations (24) -
capture
_ io (1) - chardev? (12)
- check (12)
-
check
_ until (12) - chomp (12)
- chop (12)
- chown (12)
- chr (12)
- clear (12)
-
clear
_ exclude (12) - clone (24)
- close (24)
- closed? (12)
- concat (12)
-
const
_ source _ location (12) -
create
_ makefile (12) - ctime (36)
- current (1)
-
current
_ scope (12) -
datetime
_ format (12) -
datetime
_ format= (12) -
def
_ class (12) -
def
_ inspector (12) -
def
_ module (12) - define (12)
-
define
_ task (12) - delete (36)
-
delete
_ if (12) - desc (12)
- directory? (12)
- dump (12)
- dup (24)
-
each
_ char (24) -
each
_ codepoint (24) - empty? (21)
- encoding (12)
- eos? (12)
- errors (1)
-
exception
_ details (1) -
excluded
_ from _ list? (12) - executable? (12)
-
executable
_ real? (12) - exist? (24)
- existing (12)
- existing! (12)
- exists? (9)
- expect (1)
- ext (12)
- failures (1)
- fdatasync (12)
- fetch (12)
- file? (12)
-
filter
_ backtrace (1) - flush (12)
- fnmatch (12)
- formatter (12)
- getc (12)
- gets (36)
- grpowned? (12)
- gsub (48)
- gsub! (12)
-
has
_ test _ suite? (12) -
has
_ unit _ tests? (12) - hash (12)
- identical? (12)
- import (12)
-
in
_ namespace (12) -
inplace
_ mode (12) - inspect (30)
-
install
_ update _ defaults _ str (12) - intern (12)
-
internal
_ encoding (12) - invoke (12)
-
is
_ a? (12) - it (1)
-
kind
_ of? (12) - lambda (18)
-
last
_ comment (12) -
last
_ description (12) -
latest
_ cache _ data (12) -
latest
_ cache _ file (12) -
latest
_ gc _ info (24) -
latest
_ specs (36) -
latest
_ system _ cache _ file (24) -
latest
_ user _ cache _ file (24) - lchmod (12)
- lchown (12)
- length (12)
- libs (12)
- link (12)
- loader (12)
- location (1)
- lookup (12)
- mask (12)
- match? (12)
- matched (12)
- matched? (12)
-
matched
_ size (12) - member? (12)
-
minitest
/ unit (1) - mkdir (12)
- move (12)
- mtime (12)
-
mu
_ pp (1) - mv (12)
- name (24)
- names (12)
- needed? (12)
-
net
/ smtp (12) - new (75)
-
new
_ scope (12) - on (12)
-
on
_ head (12) -
on
_ tail (12) - open (72)
-
original
_ dir (24) - owned? (12)
-
package
_ files (12) - parse (24)
- parse! (12)
- pass (1)
- passed? (1)
- path (12)
- pathmap (12)
- pattern (12)
- peek (12)
- peep (12)
- pipe? (12)
- pointer (12)
- pointer= (12)
- pos (12)
- pos= (12)
-
post
_ match (12) -
pre
_ match (12) -
prime
_ fasttest? (12) - proc (19)
-
process
_ args (1) - puke (1)
- puts (24)
- rake (12)
- rakefile (12)
- read (24)
- readable? (12)
-
readable
_ real? (12) - readlines (12)
- readlink (12)
- ready (12)
- reject (24)
- reject! (12)
- report (1)
- reset (12)
- resolve (12)
- rest (12)
- rest? (12)
-
rest
_ size (12) - restsize (12)
- result (12)
-
ruby 1
. 6 feature (12) -
ruby 1
. 8 . 2 feature (12) -
ruby 1
. 8 . 3 feature (12) -
ruby 1
. 8 . 4 feature (12) -
ruby
_ opts (12) -
rubygems
/ commands / check _ command (12) -
rubygems
/ commands / install _ command (12) - run (14)
-
run
_ test _ suites (1) - scan (12)
-
scan
_ full (12) -
scan
_ until (12) -
search
_ full (12) - select (12)
-
set
_ backtrace (12) - setgid? (12)
- setuid? (12)
-
setup
_ argv (1) - shell (6)
- size (24)
- size? (12)
- skip (12)
-
skip
_ until (12) - skips (1)
- socket? (12)
-
source
_ location (7) - src (12)
-
start
_ time (1) - status (1)
- sticky? (12)
- string (12)
- sub! (12)
-
sub
_ ext (12) - symlink? (12)
-
synthesize
_ file _ task (12) - tasks (12)
- terminate (12)
-
test
/ unit (12) -
test
_ count (1) -
test
_ file (12) -
test
_ files (12) -
test
_ methods (1) -
test
_ order (1) -
test
_ suite _ file (12) -
test
_ suites (1) -
to
_ a (24) -
to
_ ary (12) -
to
_ hash (12) -
to
_ json (24) -
to
_ s (30) -
top
_ level _ tasks (12) - unlink (12)
- unscan (12)
- verbose (12)
- verify (1)
- warn (8)
- warning (12)
-
with
_ defaults (12) -
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (8)
- yaml (12)
-
yaml
/ store (12) - zero? (12)
- クラス/メソッドの定義 (12)
- リテラル (12)
- 手続きオブジェクトの挙動の詳細 (12)
- 演算子式 (12)
検索結果
先頭5件
- Kernel
. # test(cmd , file) -> bool | Time | Integer | nil - Kernel
. # test(cmd , file1 , file2) -> bool - Shell
# test(command , file1 , file2 = nil) -> bool | Time | Integer | nil - Shell
:: CommandProcessor # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil - Shell
:: Filter # test(command , file1 , file2 = nil) -> bool | Time | Integer | nil
-
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) -
ユニットテストのファイルのリストを返します。
ユニットテストのファイルのリストを返します。