To use these helpers, you must include them in your tests.
You can do this by including it in one test suite:
describe MyClass do include ActiveSupport::Testing::TimeHelpers end
or globally:
RSpec.configure do |config| config.include ActiveSupport::Testing::TimeHelpers end
source share