When(/^I visit the (.*) path$/) do |route|
  visit eval(route.gsub(' ', '_') + '_path')
end

When(/^I click "([^"]*)"$/) do |arg|
  click_on arg
end

When(/^I visit the (.*) path$/) do |route|
  visit eval(route.tr(' ', '_') + '_path')
end

When(/^I click "([^"]*)"$/) do |arg|
  click_on arg
end

Use tr instead of gsub
Use tr instead of gsub
