capybara-mechanize 1.4.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,10 @@ class Capybara::Mechanize::Form < Capybara::RackTest::Form
10
10
  class << node
11
11
  def search(*args); []; end
12
12
  end
13
- node['method'] = method.to_s.upcase
13
+
14
+ node['method'] = button && button['formmethod']
15
+
16
+ node['method'] ||= (respond_to?(:request_method, true) ? request_method : method).to_s.upcase
14
17
 
15
18
  if self.multipart?
16
19
  node['enctype'] = 'multipart/form-data'
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Mechanize
3
- VERSION = '1.4.1'
3
+ VERSION = '1.5.0'
4
4
  end
5
5
  end
@@ -32,14 +32,14 @@ describe Capybara::Mechanize::Driver, 'remote' do
32
32
  context "for a post request" do
33
33
  it 'transforms nested map in post data' do
34
34
  driver.post("#{remote_test_url}/form", {:form => {:key => 'value'}})
35
- driver.html.should include(':key=>"value"')
35
+ driver.html.should match(/:key=>"value"|key: value/)
36
36
  end
37
37
  end
38
38
 
39
39
  context 'process remote request' do
40
40
  it 'transforms nested map in post data' do
41
41
  driver.submit(:post, "#{remote_test_url}/form", {:form => {:key => 'value'}})
42
- driver.html.should include(':key=>"value"')
42
+ driver.html.should match(/:key=>"value"|key: value/)
43
43
  end
44
44
  end
45
45
  end
@@ -12,7 +12,8 @@ Capybara::SpecHelper.run_specs TestSessions::Mechanize, "Mechanize", :capybara_s
12
12
  :server,
13
13
  :hover,
14
14
  :modals,
15
- :about_scheme
15
+ :about_scheme,
16
+ :send_keys
16
17
  ]
17
18
 
18
19
  describe Capybara::Session do
@@ -22,7 +22,8 @@ session_describe = Capybara::SpecHelper.run_specs TestSessions::Mechanize, "Mech
22
22
  :server,
23
23
  :hover,
24
24
  :modals,
25
- :about_scheme
25
+ :about_scheme,
26
+ :send_keys
26
27
  ]
27
28
 
28
29
  session_describe.include_context("remote tests")
@@ -30,7 +31,8 @@ session_describe.include_context("remote tests")
30
31
  disabler = DisableExternalTests.new
31
32
  disabler.tests_to_disable = [
32
33
  ['#visit', 'when Capybara.always_include_port is true', 'should fetch a response from the driver with an absolute url without a port'],
33
- ['#reset_session!', 'raises any errors caught inside the server']
34
+ ['#reset_session!', 'raises any errors caught inside the server'],
35
+ ['#reset_session!', 'raises any standard errors caught inside the server']
34
36
  ]
35
37
  disabler.disable(session_describe)
36
38
 
@@ -13,7 +13,7 @@ class DisableExternalTests
13
13
 
14
14
  example = example_group.examples.find{ |e| e.description == example_description }
15
15
 
16
- example.metadata[:external_test_disabled] = true
16
+ example.metadata[:external_test_disabled] = true unless example.nil?
17
17
  end
18
18
 
19
19
  end
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.4.1
4
+ version: 1.5.0
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: 2016-01-16 00:00:00.000000000 Z
12
+ date: 2016-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mechanize
@@ -33,6 +33,9 @@ dependencies:
33
33
  none: false
34
34
  requirements:
35
35
  - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: '2.4'
38
+ - - ! '>='
36
39
  - !ruby/object:Gem::Version
37
40
  version: 2.4.4
38
41
  type: :runtime
@@ -41,6 +44,9 @@ dependencies:
41
44
  none: false
42
45
  requirements:
43
46
  - - ~>
47
+ - !ruby/object:Gem::Version
48
+ version: '2.4'
49
+ - - ! '>='
44
50
  - !ruby/object:Gem::Version
45
51
  version: 2.4.4
46
52
  description: RackTest driver for Capybara, but with remote request support thanks
@@ -82,7 +88,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
82
88
  version: '0'
83
89
  segments:
84
90
  - 0
85
- hash: 304686151432439046
91
+ hash: -651939787888812663
86
92
  required_rubygems_version: !ruby/object:Gem::Requirement
87
93
  none: false
88
94
  requirements: