Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
26 lines (21 sloc) 670 Bytes
When /^I visit "([^"]+)"$/ do |path|
visit path
end
Then /^I should be redirected to "([^"]+)"$/ do |path|
URI.parse(current_url).path.should == path
response.should be_success
end
Then /^it should have "([^"]+)" as the query string$/ do |query|
URI.decode(URI.parse(current_url).query).should == query
end
Then /^it should have no query string$/ do
URI.parse(current_url).query.should be_blank
end
Then /^(?:|I )should not be on (.+)$/ do |page_name|
current_path = URI.parse(current_url).path
if current_path.respond_to? :should
current_path.should_not == path_to(page_name)
else
assert_not_equal path_to(page_name), current_path
end
end