capybara-mechanize 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -20,6 +20,8 @@ class Capybara::Driver::Mechanize < Capybara::Driver::RackTest
20
20
 
21
21
  def reset!
22
22
  @agent.cookie_jar.clear!
23
+ @last_remote_host = nil
24
+ @last_request_remote = nil
23
25
  super
24
26
  end
25
27
 
@@ -105,6 +105,20 @@ describe "Capybara::Driver::Mechanize, in local model" do
105
105
  should_be_a_local_get
106
106
  end
107
107
 
108
+ describe '#reset!' do
109
+ before :each do
110
+ Capybara.default_host = 'www.local.com'
111
+ end
112
+
113
+ it 'should reset remote host' do
114
+ @driver.visit("#{REMOTE_TEST_URL}/host")
115
+ should_be_a_remote_get
116
+ @driver.reset!
117
+ @driver.visit("/host")
118
+ should_be_a_local_get
119
+ end
120
+ end
121
+
108
122
  def should_be_a_remote_get
109
123
  @driver.body.should == "current host is #{REMOTE_TEST_HOST}, method get"
110
124
  end
@@ -35,7 +35,7 @@ describe Capybara::Session do
35
35
  end
36
36
  end
37
37
 
38
- # Pending: Still 18 failing tests here (result is 705 examples, 18 failures, instead of 384 examples)
38
+ # Pending: Still 16 failing tests here (result is 706 examples, 16 failures, instead of 385 examples)
39
39
  # it_should_behave_like "session"
40
40
 
41
41
  it_should_behave_like "session without javascript support"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-mechanize
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 6
10
- version: 0.2.6
9
+ - 7
10
+ version: 0.2.7
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeroen van Dijk