Created
June 30, 2011 11:02
-
-
Save mostlyobvious/1056013 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class WidgetsTest < Bbq::TestCase | |
scenario "old school" do | |
user = TestUser.new | |
user.visit root_url | |
user.within "#foo" do | |
user.see! "bar" | |
end | |
end | |
scenario "page components wrapped as widgets for the glory!" do | |
user = TestUser.new | |
user.visit root_url do |page| | |
widget = page.widget("#foo", Widget, :param => 'value') | |
assert widget.has?('stuff') | |
user.click(widget.last_element) # tricky, can redirect to new page | |
# where widget is not available | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment