Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add spec to clarify usage of combining #within and #have_content
  • Loading branch information
Adam McCrea committed Sep 3, 2011
1 parent 934a959 commit dc0715d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/capybara/spec/session/within_spec.rb
Expand Up @@ -12,6 +12,13 @@
@session.body.should include('Bar')
end

it "should assert content in the given scope" do
@session.within(:css, "#for_foo") do
@session.should_not have_content('First Name')
end
@session.should have_content('First Name')
end

it "should accept additional options" do
@session.within(:css, "ul li", :text => 'With Simple HTML') do
@session.click_link('Go')
Expand Down

0 comments on commit dc0715d

Please sign in to comment.