Skip to content

Instantly share code, notes, and snippets.

@shepmaster
Created September 13, 2012 15:42
Show Gist options
  • Save shepmaster/3715190 to your computer and use it in GitHub Desktop.
Save shepmaster/3715190 to your computer and use it in GitHub Desktop.
# This is a test helper class
class UI
attr_reader :page
def initialize(page)
@page = page
end
def title
page.text "//div[@id='cboxTitle']"
end
end
context "some context"
it "displays the title of the document" do
ui.title.should match(/My awesome title/)
end
def ui
UI.new(page)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment