Created
June 22, 2012 16:59
-
-
Save DCarper/2973977 to your computer and use it in GitHub Desktop.
replacement for #within
This file contains hidden or 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
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