I have this in my webrat_steps.rb already:
Then /^I should be on (.+)$/ do |page_name|
URI.parse(current_url).path.should == path_to(page_name)
end
(I think it came that way)
-- Matt
On May 3, 2009, at 8:37 PM, Mark Wilden wrote:
On Sun, May 3, 2009 at 11:28 AM, Tim Fischbach
<[email protected]> wrote:
is there currently a way to make assertions about the current location
in Then steps? Here's an example of what I would like to do:
Scenario: Creating a post
Given I am on the the posts page
When I fill in ...
And ...
Then I should be on the homepage
I have granted your wish. :)
Seriously, webrat_steps.rb already has this, if I understand you
correctly:
Then /^I should be on (.+)$/ do |page_name|
request.path.should == path_to(page_name)
end
///ark
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users