From 8a11c0e92a7efc1013c8af8e9be6afae68fb86c4 Mon Sep 17 00:00:00 2001 From: Tom Ward Date: Thu, 7 May 2009 23:11:26 +0100 Subject: [PATCH] Ensure Regexp for today's time is escaped, as time formats can contain pluses and other Regexp unfriendly characters, causing the Scenario 'Use site.time variable' to fail. Signed-off-by: Nick Quaranto --- features/step_definitions/jekyll_steps.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/step_definitions/jekyll_steps.rb b/features/step_definitions/jekyll_steps.rb index 91c64f57..631e577e 100644 --- a/features/step_definitions/jekyll_steps.rb +++ b/features/step_definitions/jekyll_steps.rb @@ -124,7 +124,7 @@ Then /^the "(.*)" file should not exist$/ do |file| end Then /^I should see today's time in "(.*)"$/ do |file| - assert_match Regexp.new(Time.now.to_s), File.open(file).readlines.join + assert_match Regexp.new(Regexp.escape(Time.now.to_s)), File.open(file).readlines.join end Then /^I should see today's date in "(.*)"$/ do |file|