7
2

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 3 years have passed since last update.

小ネタ rspecでの比較を省略しないようにする

Posted at
Failure/Error: expect(result).to be_a(Validation::Valid)
       expected #<Validation::Invalid value=#<Bundle id: nil, created_at: nil, updated_at: nil, action: nil, type: "B...on::Finder::NotFoundError: No feature_definition (site_linux) found for contract (hodor_contract)>]> to be a kind of Validation::Valid

この が見れずにデバッグに苦労すること、よくありますよね。

以下のような設定を追加することで、 に切り替わる文字長を調整できるため、…が表示されなくなります。

RSpec.configure do |config|
  config.expect_with :rspec do |c|
    c.max_formatted_output_length = 1000000
  end
end

参考: https://github.com/rspec/rspec-expectations/issues/991

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?