Permalink
Browse files

Fix missing constant when inspecting nodes

  • Loading branch information...
1 parent ce8254c commit 1c626e7359f4859016fec2d752dbe0a9dc2195a4 @jferris jferris committed Apr 14, 2011
Showing with 21 additions and 1 deletion.
  1. +1 −1 lib/capybara/driver/webkit/node.rb
  2. +20 −0 spec/integration/session_spec.rb
@@ -56,7 +56,7 @@ def visible?
end
def path
- raise NotSupportedByDriverError
+ raise Capybara::NotSupportedByDriverError
end
def trigger(event)
@@ -43,6 +43,26 @@
subject.should have_content("Goodbye");
end
end
+
+ context "simple app" do
+ before(:all) do
+ @app = lambda do |env|
+ body = <<-HTML
+ <html><body>
+ <strong>Hello</strong>
+ </body></html>
+ HTML
+ [200,
+ { 'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s },
+ [body]]
+ end
+ end
+
+ it "inspects nodes" do
+ subject.visit("/")
+ subject.all(:xpath, "//strong").first.inspect.should include("strong")
+ end
+ end
end
describe Capybara::Session, "with TestApp" do

0 comments on commit 1c626e7

Please sign in to comment.