Bug 214397 - [NEW PORT] devel/p5-Test-MockDateTime - Mock DateTime->now calls during tests.
Summary: [NEW PORT] devel/p5-Test-MockDateTime - Mock DateTime->now calls during tests.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Kurt Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-10 17:38 UTC by Henk van Oers
Modified: 2016-11-14 06:24 UTC (History)
1 user (show)

See Also:


Attachments
The sharfile of this new port (2.54 KB, text/plain)
2016-11-10 17:38 UTC, Henk van Oers
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Henk van Oers 2016-11-10 17:38:17 UTC
Created attachment 176863 [details]
The sharfile of this new port

I need this port to test the new (0.622) version of
p5-Dancer2-Plugin-Auth-Extensible

All tests PASS
But NOTE:
- The current version of portlint gives wrong warnings.
Comment 1 Kurt Jaeger freebsd_committer freebsd_triage 2016-11-14 06:24:06 UTC
Committed, thanks!
Comment 2 commit-hook freebsd_committer freebsd_triage 2016-11-14 06:24:11 UTC
A commit references this bug:

Author: pi
Date: Mon Nov 14 06:24:06 UTC 2016
New revision: 426085
URL: https://svnweb.freebsd.org/changeset/ports/426085

Log:
  New port: devel/p5-Test-MockDateTime

  Getting the current time sometimes is not very helpful
  for testing scenarios.
  Instead, if you could obtain a known value during the runtime
  of a testcase will make your results predictable.

  Why another Date Mocker?
  I wanted something simple with a very concise usage pattern
  and a mocked date should only exist and stay constant inside a scope.
  After leaving the scope the current time should be back.
  This lead to this tiny module.

  This simple module allows faking a given date and time
  for the runtime of a subsequent code block.
  By default the on keyword is exported into the namespace
  of the test file.
  The date to get mocked must be in a format that is recognized
  by DateTime::Format::DateParse.

  WWW: http://search.cpan.org/dist/Test-MockDateTime/

  PR:		214397
  Submitted by:	Henk van Oers <hvo.pm@xs4all.nl>

Changes:
  head/devel/Makefile
  head/devel/p5-Test-MockDateTime/
  head/devel/p5-Test-MockDateTime/Makefile
  head/devel/p5-Test-MockDateTime/distinfo
  head/devel/p5-Test-MockDateTime/pkg-descr
  head/devel/p5-Test-MockDateTime/pkg-plist