1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00

Issue #1229 - reset touched after session is reset

This commit is contained in:
Leslie 2014-01-16 23:57:06 -08:00
parent 743a117241
commit 52466a3f20
2 changed files with 9 additions and 1 deletions

View file

@ -77,8 +77,8 @@ module Capybara
def reset!
if @touched
driver.reset!
@touched = false
assert_no_selector :xpath, "/html/body/*"
@touched = false
end
raise @server.error if Capybara.raise_server_errors and @server and @server.error
ensure

View file

@ -35,6 +35,14 @@ describe Capybara::Session do
end
end
describe "#reset!" do
it "freshly reset session should not be touched" do
@session.instance_variable_set(:@touched, true)
@session.reset!
@session.instance_variable_get(:@touched).should be_false
end
end
describe "exit codes" do
before do
@current_dir = Dir.getwd