Skip to content

Files

Latest commit

 

History

History
25 lines (17 loc) · 429 Bytes

RSpec-Rails-AvoidSetupHook.md

File metadata and controls

25 lines (17 loc) · 429 Bytes

Pattern: Use of Rails setup method

Issue: -

Description

Checks that tests use RSpec before hook over Rails setup method.

Examples

# bad
setup do
  allow(foo).to receive(:bar)
end

# good
before do
  allow(foo).to receive(:bar)
end

Further Reading