49
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rake spec に rspec のオプションを渡す

Last updated at Posted at 2013-04-08
$ rake spec SPEC_OPTS="--format doc --tag hoge"

のように SPEC_OPTS 経由でrspecにオプションを渡すことができる。

カレントディレクトリに .rspecというファイルを用意して

.rspec
--format doc
--tag hoge

と書いても良い。

ちなみに、

$ rake spec SPEC=spec/path/to/hoge_spec.rb

SPEC 経由で指定した spec だけを実行することができる。
複数のファイルを指定する場合はスペース区切りで

$ rake spec SPEC="spec/path/to/hoge_spec.rb spec/path/to/fuga_spec.rb"

参考

49
50
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
49
50

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?