Skip to content

Instantly share code, notes, and snippets.

@hedgehog
Created November 24, 2011 08:04
Show Gist options
  • Select an option

  • Save hedgehog/1390867 to your computer and use it in GitHub Desktop.

Select an option

Save hedgehog/1390867 to your computer and use it in GitHub Desktop.
require File.dirname(__FILE__) + '/../foo_page'
describe FooPage do
before(:all) do
html = File.open(File.dirname(__FILE__) + '/../fixtures/foo.html').read
doc = Capybara.string(html)
@page = FooPage(doc)
end
let(:page) { @page }
describe "#title" do
it { page.title.should match(/foo/) }
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment