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:
parent
6f90939221
commit
8a11c0e92a
|
@ -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|
|
||||
|
|
Loading…
Reference in New Issue