Skip to content

Files

Latest commit

 

History

History
32 lines (24 loc) · 461 Bytes

RSpec-EmptyHook.md

File metadata and controls

32 lines (24 loc) · 461 Bytes

Pattern: Use of empty hook

Issue: -

Description

Checks for empty before and after hooks.

Examples

# bad
before {}
after do; end
before(:all) do
end
after(:all) { }

# good
before { create_users }
after do
  cleanup_users
end
before(:all) do
  create_feed
end
after(:all) { cleanup_feed }

Further Reading