capybara-typhoeus 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/capybara/typhoeus.rb +7 -6
- data/spec/session/typhoeus_spec.rb +8 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52f3b94df91d387fd0497c1a1f774c4f4df7375e6eeee1b5949abfbdeb70ee24
|
4
|
+
data.tar.gz: 7c06afed2246fac7ea2382be5edbeaf60bedb24a385a6249c78e2c9fb5e44072
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c47183792966d74e52b71add37aba8c7300fcf877cc24a5a898e9aa65507bea423c20d2ce4cbc6805376aa155d441ecffff70316019134e7bab2d523dca3238
|
7
|
+
data.tar.gz: f96e5e4a1f570d5a4a8f7275abb7e15d8cdd908cf6fb3eb5cbd08485747708dd28d3728e173cf6a8f36a9c19537f49603ffde82873be516c57cd20bec4109e00
|
data/lib/capybara/typhoeus.rb
CHANGED
@@ -8,12 +8,13 @@ module Capybara
|
|
8
8
|
autoload :Session, "capybara/typhoeus/session"
|
9
9
|
end
|
10
10
|
|
11
|
-
def self.
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
11
|
+
def self.session_pool
|
12
|
+
@session_pool ||= Hash.new do |hash, name|
|
13
|
+
hash[name] = if current_driver==:typhoeus
|
14
|
+
::Capybara::Typhoeus::Session.new(current_driver, app)
|
15
|
+
else
|
16
|
+
::Capybara::Session.new(current_driver, app)
|
17
|
+
end
|
17
18
|
end
|
18
19
|
end
|
19
20
|
end
|
@@ -45,10 +45,17 @@ end
|
|
45
45
|
RSpec.describe Capybara::Typhoeus::Session do
|
46
46
|
|
47
47
|
context "with typhoeus driver" do
|
48
|
+
before { Capybara.current_driver = :typhoeus }
|
48
49
|
let(:session) { TestSessions::TyphoeusTest }
|
49
50
|
|
51
|
+
describe 'Capybara#current_session' do
|
52
|
+
it 'should be a typhoeus session' do
|
53
|
+
expect(Capybara.current_session).to be_an_instance_of(Capybara::Typhoeus::Session)
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
50
57
|
describe '#driver' do
|
51
|
-
it 'should be a
|
58
|
+
it 'should be a typhoeus driver' do
|
52
59
|
expect(session.driver).to be_an_instance_of(Capybara::Typhoeus::Driver)
|
53
60
|
end
|
54
61
|
end
|