natritmeyer/site_prism — pull request #26 by adstage-david (2013-03-30 01:50:06+00:00)
Title: Allow dynamic urls in page objects

Example:

```ruby

# UserProfile.rb
class UserProfile < SitePrism::Page
set_url { "/users/#{@username}" }
set_url_matcher { url }
def initialize(username)
@username = username
end
end

# user profile steps
When /I visit Bob's profile/ do
@bob = UserProfile.new('bob')
@bob.load # -> /users/bob
end
Then /I should see Bob's profile/ do
@alice = UserProfile.new('alice')
@bob.should be_displayed #=~ /users/bob is true
@alice.should_not be_displayed #=~ /users/alice is false
end
```