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 <nick@quaran.to>
This commit is contained in:
Tom Ward 2009-05-07 23:11:26 +01:00 committed by Nick Quaranto
parent 6f90939221
commit 8a11c0e92a
1 changed files with 1 additions and 1 deletions

View File

@ -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|