4moms/rspec-xml — pull request #3 by hollowspace (2012-09-03 13:41:53+00:00)
Title: Adds ability to scope tests usings 'within' method.

For example, these tests

xml.should have_xpath('/some/element[1]/property1').with_text('value1')
xml.should have_xpath('/some/element[1]/property2').with_text('value2')

can be rewritten like so

within('/some/element[1]') do
xml.should have_xpath('/property1').with_text('value1')
xml.should have_xpath('/property2').with_text('value2')
end