Skip to content

Instantly share code, notes, and snippets.

@DCarper
Created June 22, 2012 16:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DCarper/2973977 to your computer and use it in GitHub Desktop.
Save DCarper/2973977 to your computer and use it in GitHub Desktop.
replacement for #within
def scope(selector, &block)
yield @page.find(selector)
end
describe Blah do
it 'should do stuff' do
scope("#selector") do |chunk|
chunk.should_not have_content('snosberry')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment