Skip to content

Instantly share code, notes, and snippets.

@mrmicahcooper
Created March 1, 2013 20:34
Show Gist options
  • Select an option

  • Save mrmicahcooper/5067561 to your computer and use it in GitHub Desktop.

Select an option

Save mrmicahcooper/5067561 to your computer and use it in GitHub Desktop.
require File.expand_path(File.join(File.dirname(__FILE__), "..", "support", "paths"))
Given /^(?:|I )am on (.+)$/ do |page_name|
visit path_to(page_name)
end
Then /^(?:|I )should be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
current_path.should == path_to(page_name)
else
assert_equal path_to(page_name), current_path
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment