Skip to content

Latest commit

 

History

History

timecop_linter

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

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