capybara-mechanize 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -63,12 +63,8 @@ class Capybara::Mechanize::Browser < Capybara::RackTest::Browser
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
-
def find(
|
67
|
-
|
68
|
-
dom.css(selector, Capybara::RackTest::CSSHandlers.new)
|
69
|
-
else
|
70
|
-
dom.xpath(selector)
|
71
|
-
end.map { |node| Capybara::Mechanize::Node.new(self, node) }
|
66
|
+
def find(selector)
|
67
|
+
dom.xpath(selector).map { |node| Capybara::Mechanize::Node.new(self, node) }
|
72
68
|
end
|
73
69
|
|
74
70
|
attr_reader :agent
|
@@ -13,14 +13,14 @@ describe Capybara::Mechanize::Driver, 'local' do
|
|
13
13
|
it 'should keep headers on link clicks' do
|
14
14
|
driver = Capybara::RackTest::Driver.new(TestApp, :headers => {'HTTP_FOO' => 'foobar'})
|
15
15
|
driver.visit('/header_links')
|
16
|
-
driver.
|
16
|
+
driver.find('.//a').first.click
|
17
17
|
driver.html.should include('foobar')
|
18
18
|
end
|
19
19
|
|
20
20
|
it 'should keep headers on form submit' do
|
21
21
|
driver = Capybara::RackTest::Driver.new(TestApp, :headers => {'HTTP_FOO' => 'foobar'})
|
22
22
|
driver.visit('/header_links')
|
23
|
-
driver.
|
23
|
+
driver.find('.//input').first.click
|
24
24
|
driver.html.should include('foobar')
|
25
25
|
end
|
26
26
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-mechanize
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
@@ -32,23 +32,17 @@ dependencies:
|
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
33
33
|
none: false
|
34
34
|
requirements:
|
35
|
-
- -
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '2.0'
|
38
|
-
- - ! '>='
|
35
|
+
- - '='
|
39
36
|
- !ruby/object:Gem::Version
|
40
|
-
version: 2.0.
|
37
|
+
version: 2.0.2
|
41
38
|
type: :runtime
|
42
39
|
prerelease: false
|
43
40
|
version_requirements: !ruby/object:Gem::Requirement
|
44
41
|
none: false
|
45
42
|
requirements:
|
46
|
-
- -
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: '2.0'
|
49
|
-
- - ! '>='
|
43
|
+
- - '='
|
50
44
|
- !ruby/object:Gem::Version
|
51
|
-
version: 2.0.
|
45
|
+
version: 2.0.2
|
52
46
|
description: RackTest driver for Capybara, but with remote request support thanks
|
53
47
|
to mechanize
|
54
48
|
email: jeroen@jeevidee.nl
|