Ruby 1.9 compat fix in features. Fixes #141.

This commit is contained in:
Jan Berkel 2010-03-14 17:27:38 +01:00 committed by Tom Preston-Werner
parent a8efc3a0a2
commit fa90573176
1 changed files with 1 additions and 1 deletions

View File

@ -45,7 +45,7 @@ end
Given /^I have the following posts?(?: (.*) "(.*)")?:$/ do |direction, folder, table| Given /^I have the following posts?(?: (.*) "(.*)")?:$/ do |direction, folder, table|
table.hashes.each do |post| table.hashes.each do |post|
date = Date.parse(post['date']).strftime('%Y-%m-%d') date = Date.strptime(post['date'], '%m/%d/%Y').strftime('%Y-%m-%d')
title = post['title'].downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-') title = post['title'].downcase.gsub(/[^\w]/, " ").strip.gsub(/\s+/, '-')
if direction && direction == "in" if direction && direction == "in"