Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge pull request #480 from adamlogic/within_spec

Add spec to clarify usage of combining #within and #have_content
  • Loading branch information...
commit 8a2633ad60908e2634ba5f25a00d8711601bb054 2 parents 934a959 + dc0715d
Jonas Nicklas authored September 04, 2011

Showing 1 changed file with 7 additions and 0 deletions. Show diff stats Hide diff stats

  1. 7  lib/capybara/spec/session/within_spec.rb
7  lib/capybara/spec/session/within_spec.rb
@@ -12,6 +12,13 @@
12 12
         @session.body.should include('Bar')
13 13
       end
14 14
 
  15
+      it "should assert content in the given scope" do
  16
+        @session.within(:css, "#for_foo") do
  17
+          @session.should_not have_content('First Name')
  18
+        end
  19
+        @session.should have_content('First Name')
  20
+      end
  21
+
15 22
       it "should accept additional options" do
16 23
         @session.within(:css, "ul li", :text => 'With Simple HTML') do
17 24
           @session.click_link('Go')

0 notes on commit 8a2633a

Please sign in to comment.
Something went wrong with that request. Please try again.