capybara-webkit 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-webkit (0.7.0)
4
+ capybara-webkit (0.7.1)
5
5
  capybara (< 1.2, >= 1.0.0)
6
6
 
7
7
  GEM
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "capybara-webkit"
3
- s.version = "0.7.0"
3
+ s.version = "0.7.1"
4
4
  s.authors = ["thoughtbot", "Joe Ferris", "Jason Morrison", "Tristan Dunn",
5
5
  "Joshua Clayton", "Yuichi Tateno", "Aaron Gibralter",
6
6
  "Vasily Reys", "petrushka", "John Bintz", "Chad Pytel",
data/spec/driver_spec.rb CHANGED
@@ -1013,4 +1013,32 @@ describe Capybara::Driver::Webkit do
1013
1013
  node.text.should == 'Hello'
1014
1014
  end
1015
1015
  end
1016
+
1017
+ context "javascript redirect app" do
1018
+ before(:all) do
1019
+ @app = lambda do |env|
1020
+ if env['PATH_INFO'] == '/redirect'
1021
+ body = <<-HTML
1022
+ <html>
1023
+ <script type="text/javascript">
1024
+ window.location = "/next";
1025
+ </script>
1026
+ </html>
1027
+ HTML
1028
+ else
1029
+ body = "<html><p>finished</p></html>"
1030
+ end
1031
+ [200,
1032
+ { 'Content-Type' => 'text/html', 'Content-Length' => body.length.to_s },
1033
+ [body]]
1034
+ end
1035
+ end
1036
+
1037
+ it "loads a page without error" do
1038
+ 10.times do
1039
+ subject.visit("/redirect")
1040
+ subject.find("//p").first.text.should == "finished"
1041
+ end
1042
+ end
1043
+ end
1016
1044
  end
data/src/Visit.cpp CHANGED
@@ -16,5 +16,6 @@ void Visit::loadFinished(bool success) {
16
16
  if (!success)
17
17
  message = page()->failureString();
18
18
 
19
+ disconnect(page(), SIGNAL(pageFinished(bool)), this, SLOT(loadFinished(bool)));
19
20
  emit finished(new Response(success, message));
20
21
  }
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-webkit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
4
+ hash: 1
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 7
9
- - 0
10
- version: 0.7.0
9
+ - 1
10
+ version: 0.7.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - thoughtbot
@@ -30,7 +30,7 @@ autorequire:
30
30
  bindir: bin
31
31
  cert_chain: []
32
32
 
33
- date: 2011-09-30 00:00:00 -05:00
33
+ date: 2011-10-01 00:00:00 -05:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency