Skip to content

Commit

Permalink
Ensure Regexp for today's time is escaped, as time formats can contai…
Browse files Browse the repository at this point in the history
…n pluses and other Regexp unfriendly characters, causing the Scenario 'Use site.time variable' to fail.

Signed-off-by: Nick Quaranto <nick@quaran.to>
  • Loading branch information
tomafro authored and qrush committed May 9, 2009
1 parent 6f90939 commit 8a11c0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion features/step_definitions/jekyll_steps.rb
Expand Up @@ -124,7 +124,7 @@
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|
Expand Down

0 comments on commit 8a11c0e

Please sign in to comment.