Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 612 Bytes

File metadata and controls

21 lines (14 loc) · 612 Bytes

Timecop Linter

Warn if Timecop hasn't been returned at the end of the top-level example group.

If you do not call Timecop.return, you might want to use this script to ensure that you always return in-place.

Usage

NOTE: RSpec only.

  • Drop the timecop_linter_rspec.rb script into spec/support folder
  • Load it in your rspec_helper.rb
  • Run tests and watch for warnings:
$ bundle exec rspec

📛 ⏰ 📛 Timecop hasn't returned at the end of the test file!
File: spec/controllers/users_controller_spec.rb