Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

Commit

Permalink
Feature to show todays date in output
Browse files Browse the repository at this point in the history
  • Loading branch information
Bèr Kessels committed Mar 11, 2013
1 parent 19e0417 commit 66beb54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions features/due.feature
Expand Up @@ -7,6 +7,11 @@ Feature: Due
Background:
Given a default config exists

Scenario: Show todays date
Given a todofile exists
When I run `todotxt due` interactively
Then it should pass with todays date

Scenario: List todays due
Given the date is "2012-12-12"
Given a todofile with the following items exists:
Expand Down
5 changes: 5 additions & 0 deletions features/step_definitions/list_steps.rb
Expand Up @@ -27,3 +27,8 @@
Then /^it should output "([^"]*)" in "([^"]*)"$/ do |string, color|
assert_partial_output(string.color(color.to_sym), all_output)
end

Then /^it should pass with todays date$/ do
today = DateTime.now.strftime("%Y-%m-%d")
step "it should pass with regex:", ".*#{today}.*"
end

0 comments on commit 66beb54

Please sign in to comment.