Permalink
Browse files

Rename Driver#body to Driver#html

  • Loading branch information...
1 parent 32b92ad commit f0a2d64550d8ad79bf0bcaf1d2021cac7ad9bb1a @mhoran mhoran committed Nov 17, 2012
Showing with 9 additions and 9 deletions.
  1. +1 −1 lib/capybara/webkit/driver.rb
  2. +4 −4 spec/driver_resize_window_spec.rb
  3. +4 −4 spec/driver_spec.rb
@@ -41,7 +41,7 @@ def source
browser.source
end
- def body
+ def html
browser.body
end
@@ -36,23 +36,23 @@
@driver.visit("/")
@driver.resize_window(800, 600)
- @driver.body.should include("[800x600]")
+ @driver.html.should include("[800x600]")
@driver.resize_window(300, 100)
- @driver.body.should include("[300x100]")
+ @driver.html.should include("[300x100]")
end
it "resizes the window to the specified size even before the document has loaded" do
@driver.resize_window(800, 600)
@driver.visit("/")
- @driver.body.should include("[800x600]")
+ @driver.html.should include("[800x600]")
end
it "resets the window to the default size when the driver is reset" do
@driver.resize_window(800, 600)
@driver.reset!
@driver.visit("/")
- @driver.body.should include(DEFAULT_DIMENTIONS)
+ @driver.html.should include(DEFAULT_DIMENTIONS)
end
after(:all) { @driver.reset! }
View
@@ -247,7 +247,7 @@
before { driver.visit("/") }
it "renders unsupported content types gracefully" do
- driver.body.should =~ /css/
+ driver.html.should =~ /css/
end
it "sets the response headers with respect to the unsupported request" do
@@ -1556,7 +1556,7 @@ def set_automatic_reload(value)
it "submits a form without clicking" do
driver.find("//form")[0].submit
- driver.body.should include "Congrats"
+ driver.html.should include "Congrats"
end
end
@@ -1866,7 +1866,7 @@ def which_for(character)
it "can authenticate a request" do
driver.browser.authenticate('user', 'password')
driver.visit("/")
- driver.body.should include("Basic "+Base64.encode64("user:password").strip)
+ driver.html.should include("Basic "+Base64.encode64("user:password").strip)
end
end
@@ -1926,7 +1926,7 @@ def which_for(character)
it "should not fetch blocked scripts" do
driver.visit("/")
- driver.body.should_not include("Script Run")
+ driver.html.should_not include("Script Run")
end
it "should fetch unblocked urls" do

0 comments on commit f0a2d64

Please sign in to comment.