LoginSignup
3
3

More than 5 years have passed since last update.

rspec2からrspec3で変わったこと

Posted at
  • 詳細出すときのオプション-fs が-fdになった
be rspec -fd spec/models/hoge_spec.rb
  • 実行行指定の--line 行数 が:行数になった
be rspec -fd spec/models/hoge_spec.rb:30
  • 何のテストか判別したいときは、spec/spec_helper.rbに↓入れる
config.infer_spec_type_from_file_location!
require 'rails_helper'
  • spec_helper.rb or rails_helper.rbの中身↓

expectations.include_chain_clauses_in_custom_matcher_descriptions = true

  • カスタムマッチャチェインにdescription出すときに必要

mocks.verify_partial_doubles = true

config.filter_run :focus

config.disable_monkey_patching!

config.order = :random

3
3
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
3
3