るりまサーチ

最速Rubyリファレンスマニュアル検索!
176件ヒット [1-100件を表示] (0.019秒)

別のキーワード

  1. kernel test
  2. _builtin test
  3. rubygems/test_utilities tempio
  4. rubygems/test_utilities fetcher=
  5. validator unit_test

検索結果

<< 1 2 > >>

test/unit (26204.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.rb)が必要です...
...Filter test names on pattern.
--jobs-status [TYPE] Show status of jobs every file; Disabled when --jobs isn't specified.
-j, --jobs N Allow run tests with N jobs at once
--no-retry Don't retry running testcase when --jo...

MiniTest::Unit::TestCase#run(runner) -> String (24201.0)

自身に関連付けられているテストを実行します。

...自身に関連付けられているテストを実行します。

MiniTest::Unit::TestCase#setup がサブクラスで再定義されている場合はそれらも実行します。

@param runner テストの実行結果を管理するオブジェクトを指定します。...

MiniTest::Unit#run(args = []) -> Fixnum | nil (21101.0)

全てのテストを実行するためのメソッドです。

全てのテストを実行するためのメソッドです。

@param args コマンドライン引数を指定します。

ERB#run(b=TOPLEVEL_BINDING) -> nil (18149.0)

ERB を b の binding で実行し、結果を標準出力へ印字します。

...ERB を b の binding で実行し、結果を標準出力へ印字します。

@param b eRubyスクリプトが実行されるときのbinding

//emlist[例][ruby]{
require 'erb'
erb = ERB.new("test <%= test1 %>\ntest <%= test2 %>\n")
test
1 = "foo"
test
2 = "bar"
erb.run
# test foo
# test bar
//}...

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

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

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

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

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

絞り込み条件を変える

minitest/autorun (12016.0)

このファイルを Kernel.#require するとテストが test/unit と同じように自動実行されます。

...このファイルを Kernel.#require するとテストが test/unit と同じように自動実行されます。...

rake/runtest (12000.0)

MiniTest::Unit.autorun -> true (9100.0)

プロセスの終了時にテストを実行するように登録します。

プロセスの終了時にテストを実行するように登録します。

Rake::TestTask (6090.0)

ユニットテストを実行するためのタスクを作成するクラスです。

...:TestTask.new do |t|
t.libs << "test"
t.test_files = FileList['test/test*.rb']
t.verbose = true
end

以下に test ターゲットの使用例を示します。

例:
rake test # run tests normally
rake test TEST=just_one_file.rb # run just one test...
...file.
rake test TESTOPTS="-v" # run in verbose mode
rake test TESTOPTS="--runner=fox" # use the fox test runner...

ruby 1.8.4 feature (246.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...
..._inspect), parse.y (parser_yylex, rb_symname_p): check
# if valid as a symbol name more strictly. [ruby-dev:27478]
#
# * test/ruby/test_symbol.rb: tests for [ruby-core:03573].

Symbolに適合する文字列を厳密にした。((<ruby-core:03573>)),((<ruby-dev:27478>))

1...
...グナル [bug]

#Sun Oct 16 03:38:07 2005 Yukihiro Matsumoto <matz@ruby-lang.org>
#
# * rubysig.h (CHECK_INTS): prevent signal handler to run during
# critical section. [ruby-core:04039]

シグナルハンドラの実行はクリティカルセクションが終了するまで...

絞り込み条件を変える

ruby 1.6 feature (60.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...: 2002-03-08 class variable

((<ruby-talk:35122>))

class C
class << self
def test
@@cv = 5
p @@cv
end
end

test

end
=> -:5:in `test': uninitialized class variable @@cv in C (NameError)
from -:9
ruby 1.6.7 (2002...
...%w!a! "b"
^
ruby 1.6.5 (2001-10-10) [i586-linux]

: Thread

Thread#status が aborting 状態に対して "run" を返していたバグが修正
されました。また、Thread#priority = val が val でなく self を返して
いました。((<rubyi...
...can't dump anonymous class #<Class 0lx401ab980> (ArgumentError)
from -:1
ruby 1.6.5 (2001-10-05) [i586-linux]

: UNIXSocket#addr

UN
IXSocket#addr がゴミを返していました(BSD の場合?)。
((<ruby-bugs-ja:PR#85>))

# server
require 'socket'...

rake (48.0)

Rake というコマンドラインツールを扱うライブラリです。

...したタスクの詳細を表示して終了します。
パターンは省略可能です。
-n, --dry-run アクションを実行せずにタスクを実行します。
-e, --execute CODE Ruby のコードを実行して...
...g: utf-8
require 'rake/testtask'
require 'rake/clean' # clean, clobber の二つのタスクを定義
task :default => [:test]

1.upto(8) do |n|
Rake::TestTask.new("test_step#{n}") do |t|
t.libs << "step#{n}"
t.test_files = FileList["step#{n}/test_*.rb"]
t.verbose...
...= false
end
end

desc 'execute all test'
task 'test_all' => (1..8).to_a.map{|n| "test_step#{n}"}

=== 用語集


: action / アクション
タスクを機能させるためのコードです。
Rakefile 内のアクションはコードブロックで指定されます。(たいて...

NEWS for Ruby 3.1.0 (42.0)

NEWS for Ruby 3.1.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。

...2.0
* uri 0.11.0
* yaml 0.2.0
* zlib 2.1.1
* 以下のbundled gemsが更新されました。
* minitest 5.15.0
* power_assert 2.0.1
* rake 13.0.6
* test-unit 3.5.3
* rexml 3.2.5
* rbs 2.0.0
* typeprof 0.21.1
* 以下のdefault gemsがbundled gemsに変更...
...le]
//}

jsonがnilの時、

//emlist{
$ ruby test.rb
test
.rb:2:in `<main>': undefined method `[]' for nil:NilClass (NoMethodError)

title = json[:article][:title]
^^^^^^^^^^
//}

json[:article] が返す時、

//emlist{
$ ruby test.rb
test
.rb:2:in `<main>': undefined method `[]' for n...
...RRに出力されるようになりました。 17798

* ruby -run -e httpd はアクセスされた時にURLを出力するようになりました。 17847

* IRB::Color.colorize_code を使ってRubyのコードをカラー化するために ruby -run -e colorize が追加されました。...

1.6.8から1.8.0への変更点(まとめ) (36.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...任意
の値を返すことができます。

: 多重代入 [change]

多重代入の規則を見直しました。

# # derived from sample/test.rb
# a = *[]; p a # special case
# def f; yield; end; f {|a| p a} # add (warning)
# def r; return; end; a = r...
...rceforge.net/>))
((<URL:http://yaml.org/>))

: ((<zlib>)) [lib] [new]

追加

: ((<bigdecimal>)) [lib] [new]

追加

: ((<"test/unit"|Test::Unit>)) [new]

Test
::Unit 追加

: ((<"win32/registry">)) [new]
Win32でレジストリにアクセスするためのライブラリが追加され...
...要があります。
p 'a' < 'b' # => true
p 'aa' < 'b' # => true

: ((<Thread#wakeup|Thread/wakeup>)) [bug]
: ((<Thread#run|Thread/run>)) [bug]
終了中(aborting)のスレッドに対して実行するとスレッドが生き返る
バグが修正されました。
((<r...
<< 1 2 > >>