Skip to content

Files

Latest commit

 

History

History
38 lines (28 loc) · 700 Bytes

RSpec-NoExpectationExample.md

File metadata and controls

38 lines (28 loc) · 700 Bytes

Pattern: RSpec example without expectation

Issue: -

Description

Checks if an example contains any expectation.

All RSpec's example and expectation methods are covered by default. If you are using your own custom methods, add the following configuration:

RSpec: Language: Examples: Regular: - custom_it Expectations: - custom_expect

Examples

# bad
it do
  a?
end

# good
it do
  expect(a?).to be(true)
end

Further Reading