capybara 2.0.3 → 2.1.0

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.
Files changed (82) hide show
  1. data/History.md +82 -0
  2. data/README.md +57 -52
  3. data/lib/capybara/cucumber.rb +4 -1
  4. data/lib/capybara/driver/base.rb +13 -9
  5. data/lib/capybara/driver/node.rb +18 -6
  6. data/lib/capybara/helpers.rb +111 -22
  7. data/lib/capybara/node/actions.rb +30 -25
  8. data/lib/capybara/node/base.rb +25 -32
  9. data/lib/capybara/node/document.rb +6 -2
  10. data/lib/capybara/node/element.rb +44 -7
  11. data/lib/capybara/node/finders.rb +49 -22
  12. data/lib/capybara/node/matchers.rb +38 -21
  13. data/lib/capybara/node/simple.rb +31 -9
  14. data/lib/capybara/query.rb +72 -26
  15. data/lib/capybara/rack_test/browser.rb +11 -3
  16. data/lib/capybara/rack_test/css_handlers.rb +8 -0
  17. data/lib/capybara/rack_test/driver.rb +11 -3
  18. data/lib/capybara/rack_test/form.rb +8 -1
  19. data/lib/capybara/rack_test/node.rb +91 -35
  20. data/lib/capybara/rails.rb +0 -1
  21. data/lib/capybara/result.rb +21 -37
  22. data/lib/capybara/rspec/matchers.rb +60 -31
  23. data/lib/capybara/selector.rb +46 -13
  24. data/lib/capybara/selenium/driver.rb +42 -7
  25. data/lib/capybara/selenium/node.rb +23 -5
  26. data/lib/capybara/server.rb +1 -1
  27. data/lib/capybara/session.rb +47 -12
  28. data/lib/capybara/spec/public/test.js +12 -0
  29. data/lib/capybara/spec/session/all_spec.rb +9 -8
  30. data/lib/capybara/spec/session/attach_file_spec.rb +14 -0
  31. data/lib/capybara/spec/session/check_spec.rb +14 -0
  32. data/lib/capybara/spec/session/choose_spec.rb +14 -0
  33. data/lib/capybara/spec/session/click_button_spec.rb +77 -1
  34. data/lib/capybara/spec/session/click_link_or_button_spec.rb +65 -0
  35. data/lib/capybara/spec/session/click_link_spec.rb +24 -0
  36. data/lib/capybara/spec/session/current_scope_spec.rb +29 -0
  37. data/lib/capybara/spec/session/fill_in_spec.rb +26 -0
  38. data/lib/capybara/spec/session/find_button_spec.rb +12 -0
  39. data/lib/capybara/spec/session/find_by_id_spec.rb +12 -1
  40. data/lib/capybara/spec/session/find_field_spec.rb +30 -0
  41. data/lib/capybara/spec/session/find_link_spec.rb +12 -0
  42. data/lib/capybara/spec/session/find_spec.rb +264 -16
  43. data/lib/capybara/spec/session/first_spec.rb +25 -8
  44. data/lib/capybara/spec/session/has_css_spec.rb +2 -2
  45. data/lib/capybara/spec/session/has_field_spec.rb +10 -2
  46. data/lib/capybara/spec/session/has_selector_spec.rb +9 -0
  47. data/lib/capybara/spec/session/has_text_spec.rb +96 -0
  48. data/lib/capybara/spec/session/has_title_spec.rb +47 -0
  49. data/lib/capybara/spec/session/node_spec.rb +48 -0
  50. data/lib/capybara/spec/session/reset_session_spec.rb +10 -2
  51. data/lib/capybara/spec/session/save_page_spec.rb +30 -0
  52. data/lib/capybara/spec/session/select_spec.rb +65 -0
  53. data/lib/capybara/spec/session/text_spec.rb +31 -0
  54. data/lib/capybara/spec/session/title_spec.rb +16 -0
  55. data/lib/capybara/spec/session/uncheck_spec.rb +14 -0
  56. data/lib/capybara/spec/session/unselect_spec.rb +42 -0
  57. data/lib/capybara/spec/session/visit_spec.rb +3 -3
  58. data/lib/capybara/spec/session/within_frame_spec.rb +14 -0
  59. data/lib/capybara/spec/session/within_spec.rb +3 -3
  60. data/lib/capybara/spec/spec_helper.rb +7 -2
  61. data/lib/capybara/spec/views/form.erb +39 -2
  62. data/lib/capybara/spec/views/frame_child.erb +9 -0
  63. data/lib/capybara/spec/views/frame_parent.erb +8 -0
  64. data/lib/capybara/spec/views/with_base_tag.erb +10 -0
  65. data/lib/capybara/spec/views/with_count.erb +7 -0
  66. data/lib/capybara/spec/views/with_hover.erb +17 -0
  67. data/lib/capybara/spec/views/with_html.erb +23 -2
  68. data/lib/capybara/spec/views/with_js.erb +5 -0
  69. data/lib/capybara/spec/views/with_scope.erb +6 -1
  70. data/lib/capybara/spec/views/with_title.erb +1 -0
  71. data/lib/capybara/spec/views/within_frames.erb +1 -0
  72. data/lib/capybara/version.rb +1 -1
  73. data/lib/capybara.rb +43 -62
  74. data/spec/basic_node_spec.rb +75 -24
  75. data/spec/dsl_spec.rb +2 -1
  76. data/spec/rack_test_spec.rb +4 -3
  77. data/spec/rspec/matchers_spec.rb +105 -17
  78. data/spec/server_spec.rb +15 -8
  79. data/spec/spec_helper.rb +2 -1
  80. data.tar.gz.sig +0 -0
  81. metadata +82 -22
  82. metadata.gz.sig +0 -0
@@ -29,9 +29,28 @@ describe Capybara::RSpecMatchers do
29
29
 
30
30
  it "fails if matched node count does not equal expected count" do
31
31
  expect do
32
- "<h1>Text</h1>".should have_css('h1', :count => 2)
33
- end.to raise_error(/expected css "h1" to be found 2 times/)
32
+ "<h1>Text</h1>".should have_css('h1', count: 2)
33
+ end.to raise_error("expected to find css \"h1\" 2 times, found 1 match: \"Text\"")
34
34
  end
35
+
36
+ it "fails if matched node count is less than expected minimum count" do
37
+ expect do
38
+ "<h1>Text</h1>".should have_css('p', minimum: 1)
39
+ end.to raise_error("expected to find css \"p\" at least 1 time but there were no matches")
40
+ end
41
+
42
+ it "fails if matched node count is more than expected maximum count" do
43
+ expect do
44
+ "<h1>Text</h1><h1>Text</h1><h1>Text</h1>".should have_css('h1', maximum: 2)
45
+ end.to raise_error('expected to find css "h1" at most 2 times, found 3 matches: "Text", "Text", "Text"')
46
+ end
47
+
48
+ it "fails if matched node count does not belong to expected range" do
49
+ expect do
50
+ "<h1>Text</h1>".should have_css('h1', between: 2..3)
51
+ end.to raise_error("expected to find css \"h1\" between 2 and 3 times, found 1 match: \"Text\"")
52
+ end
53
+
35
54
  end
36
55
 
37
56
  context "with should_not" do
@@ -222,7 +241,7 @@ describe Capybara::RSpecMatchers do
222
241
 
223
242
  describe "have_content matcher" do
224
243
  it "gives proper description" do
225
- have_content('Text').description.should == "have text \"Text\""
244
+ have_content('Text').description.should == "text \"Text\""
226
245
  end
227
246
 
228
247
  context "on a string" do
@@ -238,7 +257,7 @@ describe Capybara::RSpecMatchers do
238
257
  it "fails if has_content? returns false" do
239
258
  expect do
240
259
  "<h1>Text</h1>".should have_content('No such Text')
241
- end.to raise_error(/expected there to be text "No such Text" in "Text"/)
260
+ end.to raise_error(/expected to find text "No such Text" in "Text"/)
242
261
  end
243
262
  end
244
263
 
@@ -254,7 +273,7 @@ describe Capybara::RSpecMatchers do
254
273
  it "fails if has_no_content? returns false" do
255
274
  expect do
256
275
  "<h1>Text</h1>".should_not have_content('Text')
257
- end.to raise_error(/expected there not to be text "Text" in "Text"/)
276
+ end.to raise_error(/expected not to find text "Text" in "Text"/)
258
277
  end
259
278
  end
260
279
  end
@@ -276,7 +295,7 @@ describe Capybara::RSpecMatchers do
276
295
  it "fails if has_content? returns false" do
277
296
  expect do
278
297
  page.should have_content('No such Text')
279
- end.to raise_error(/expected there to be text "No such Text" in "(.*)This is a test(.*)"/)
298
+ end.to raise_error(/expected to find text "No such Text" in "(.*)This is a test(.*)"/)
280
299
  end
281
300
 
282
301
  context "with default selector CSS" do
@@ -284,7 +303,7 @@ describe Capybara::RSpecMatchers do
284
303
  it "fails if has_content? returns false" do
285
304
  expect do
286
305
  page.should have_content('No such Text')
287
- end.to raise_error(/expected there to be text "No such Text" in "(.*)This is a test(.*)"/)
306
+ end.to raise_error(/expected to find text "No such Text" in "(.*)This is a test(.*)"/)
288
307
  end
289
308
  after { Capybara.default_selector = :xpath }
290
309
  end
@@ -298,7 +317,7 @@ describe Capybara::RSpecMatchers do
298
317
  it "fails if has_no_content? returns false" do
299
318
  expect do
300
319
  page.should_not have_content('This is a test')
301
- end.to raise_error(/expected there not to be text "This is a test"/)
320
+ end.to raise_error(/expected not to find text "This is a test"/)
302
321
  end
303
322
  end
304
323
  end
@@ -306,7 +325,7 @@ describe Capybara::RSpecMatchers do
306
325
 
307
326
  describe "have_text matcher" do
308
327
  it "gives proper description" do
309
- have_text('Text').description.should == "have text \"Text\""
328
+ have_text('Text').description.should == "text \"Text\""
310
329
  end
311
330
 
312
331
  context "on a string" do
@@ -322,13 +341,37 @@ describe Capybara::RSpecMatchers do
322
341
  it "fails if has_text? returns false" do
323
342
  expect do
324
343
  "<h1>Text</h1>".should have_text('No such Text')
325
- end.to raise_error(/expected there to be text "No such Text" in "Text"/)
344
+ end.to raise_error(/expected to find text "No such Text" in "Text"/)
345
+ end
346
+
347
+ it "casts Fixnum to string" do
348
+ expect do
349
+ "<h1>Text</h1>".should have_text(3)
350
+ end.to raise_error(/expected to find text "3" in "Text"/)
351
+ end
352
+
353
+ it "fails if matched text count does not equal to expected count" do
354
+ expect do
355
+ "<h1>Text</h1>".should have_text('Text', count: 2)
356
+ end.to raise_error(/expected to find text "Text" 2 times in "Text"/)
357
+ end
358
+
359
+ it "fails if matched text count is less than expected minimum count" do
360
+ expect do
361
+ "<h1>Text</h1>".should have_text('Lorem', minimum: 1)
362
+ end.to raise_error(/expected to find text "Lorem" at least 1 time in "Text"/)
363
+ end
364
+
365
+ it "fails if matched text count is more than expected maximum count" do
366
+ expect do
367
+ "<h1>Text TextText</h1>".should have_text('Text', maximum: 2)
368
+ end.to raise_error(/expected to find text "Text" at most 2 times in "Text TextText"/)
326
369
  end
327
370
 
328
- it "casts has_text? argument to string" do
371
+ it "fails if matched text count does not belong to expected range" do
329
372
  expect do
330
- "<h1>Text</h1>".should have_text(:cast_me)
331
- end.to raise_error(/expected there to be text "cast_me" in "Text"/)
373
+ "<h1>Text</h1>".should have_text('Text', between: 2..3)
374
+ end.to raise_error(/expected to find text "Text" between 2 and 3 times in "Text"/)
332
375
  end
333
376
  end
334
377
 
@@ -344,7 +387,7 @@ describe Capybara::RSpecMatchers do
344
387
  it "fails if has_no_text? returns false" do
345
388
  expect do
346
389
  "<h1>Text</h1>".should_not have_text('Text')
347
- end.to raise_error(/expected there not to be text "Text" in "Text"/)
390
+ end.to raise_error(/expected not to find text "Text" in "Text"/)
348
391
  end
349
392
  end
350
393
  end
@@ -363,10 +406,19 @@ describe Capybara::RSpecMatchers do
363
406
  page.should have_text(/test/)
364
407
  end
365
408
 
409
+ it "can check for all text" do
410
+ page.should have_text(:all, 'Some of this text is hidden!')
411
+ end
412
+
413
+ it "can check for visible text" do
414
+ page.should have_text(:visible, 'Some of this text is')
415
+ page.should_not have_text(:visible, 'Some of this text is hidden!')
416
+ end
417
+
366
418
  it "fails if has_text? returns false" do
367
419
  expect do
368
420
  page.should have_text('No such Text')
369
- end.to raise_error(/expected there to be text "No such Text" in "(.*)This is a test(.*)"/)
421
+ end.to raise_error(/expected to find text "No such Text" in "(.*)This is a test(.*)"/)
370
422
  end
371
423
 
372
424
  context "with default selector CSS" do
@@ -374,7 +426,7 @@ describe Capybara::RSpecMatchers do
374
426
  it "fails if has_text? returns false" do
375
427
  expect do
376
428
  page.should have_text('No such Text')
377
- end.to raise_error(/expected there to be text "No such Text" in "(.*)This is a test(.*)"/)
429
+ end.to raise_error(/expected to find text "No such Text" in "(.*)This is a test(.*)"/)
378
430
  end
379
431
  after { Capybara.default_selector = :xpath }
380
432
  end
@@ -388,7 +440,7 @@ describe Capybara::RSpecMatchers do
388
440
  it "fails if has_no_text? returns false" do
389
441
  expect do
390
442
  page.should_not have_text('This is a test')
391
- end.to raise_error(/expected there not to be text "This is a test"/)
443
+ end.to raise_error(/expected not to find text "This is a test"/)
392
444
  end
393
445
  end
394
446
  end
@@ -412,6 +464,42 @@ describe Capybara::RSpecMatchers do
412
464
  end
413
465
  end
414
466
 
467
+ describe "have_title matcher" do
468
+ it "gives proper description" do
469
+ have_title('Just a title').description.should == "have title \"Just a title\""
470
+ end
471
+
472
+ context "on a string" do
473
+ let(:html) { '<title>Just a title</title>' }
474
+
475
+ it "passes if there is such a title" do
476
+ html.should have_title('Just a title')
477
+ end
478
+
479
+ it "fails if there is no such title" do
480
+ expect do
481
+ html.should have_title('No such title')
482
+ end.to raise_error(/expected there to be title "No such title"/)
483
+ end
484
+ end
485
+
486
+ context "on a page or node" do
487
+ before do
488
+ visit('/with_js')
489
+ end
490
+
491
+ it "passes if there is such a title" do
492
+ page.should have_title('with_js')
493
+ end
494
+
495
+ it "fails if there is no such title" do
496
+ expect do
497
+ page.should have_title('No such title')
498
+ end.to raise_error(/expected there to be title "No such title"/)
499
+ end
500
+ end
501
+ end
502
+
415
503
  describe "have_button matcher" do
416
504
  let(:html) { '<button>A button</button><input type="submit" value="Another button"/>' }
417
505
 
data/spec/server_spec.rb CHANGED
@@ -3,7 +3,7 @@ require 'spec_helper'
3
3
  describe Capybara::Server do
4
4
 
5
5
  it "should spool up a rack server" do
6
- @app = proc { |env| [200, {}, "Hello Server!"]}
6
+ @app = proc { |env| [200, {}, ["Hello Server!"]]}
7
7
  @server = Capybara::Server.new(@app).boot
8
8
 
9
9
  @res = Net::HTTP.start(@server.host, @server.port) { |http| http.get('/') }
@@ -20,7 +20,7 @@ describe Capybara::Server do
20
20
  it "should bind to the specified host" do
21
21
  Capybara.server_host = '0.0.0.0'
22
22
 
23
- app = proc { |env| [200, {}, "Hello Server!"]}
23
+ app = proc { |env| [200, {}, ["Hello Server!"]]}
24
24
  server = Capybara::Server.new(app).boot
25
25
  server.host.should == '0.0.0.0'
26
26
 
@@ -30,7 +30,7 @@ describe Capybara::Server do
30
30
  it "should use specified port" do
31
31
  Capybara.server_port = 22789
32
32
 
33
- @app = proc { |env| [200, {}, "Hello Server!"]}
33
+ @app = proc { |env| [200, {}, ["Hello Server!"]]}
34
34
  @server = Capybara::Server.new(@app).boot
35
35
 
36
36
  @res = Net::HTTP.start(@server.host, 22789) { |http| http.get('/') }
@@ -40,7 +40,7 @@ describe Capybara::Server do
40
40
  end
41
41
 
42
42
  it "should use given port" do
43
- @app = proc { |env| [200, {}, "Hello Server!"]}
43
+ @app = proc { |env| [200, {}, ["Hello Server!"]]}
44
44
  @server = Capybara::Server.new(@app, 22790).boot
45
45
 
46
46
  @res = Net::HTTP.start(@server.host, 22790) { |http| http.get('/') }
@@ -50,8 +50,8 @@ describe Capybara::Server do
50
50
  end
51
51
 
52
52
  it "should find an available port" do
53
- @app1 = proc { |env| [200, {}, "Hello Server!"]}
54
- @app2 = proc { |env| [200, {}, "Hello Second Server!"]}
53
+ @app1 = proc { |env| [200, {}, ["Hello Server!"]]}
54
+ @app2 = proc { |env| [200, {}, ["Hello Second Server!"]]}
55
55
 
56
56
  @server1 = Capybara::Server.new(@app1).boot
57
57
  @server2 = Capybara::Server.new(@app2).boot
@@ -64,8 +64,8 @@ describe Capybara::Server do
64
64
  end
65
65
 
66
66
  it "should use the server if it already running" do
67
- @app1 = proc { |env| [200, {}, "Hello Server!"]}
68
- @app2 = proc { |env| [200, {}, "Hello Second Server!"]}
67
+ @app1 = proc { |env| [200, {}, ["Hello Server!"]]}
68
+ @app2 = proc { |env| [200, {}, ["Hello Second Server!"]]}
69
69
 
70
70
  @server1a = Capybara::Server.new(@app1).boot
71
71
  @server1b = Capybara::Server.new(@app1).boot
@@ -98,4 +98,11 @@ describe Capybara::Server do
98
98
  Capybara.server {|app, port| Capybara.run_default_server(app, port)}
99
99
  end
100
100
  end
101
+
102
+ it "is not #responsive? when Net::HTTP raises a SystemCallError" do
103
+ app = lambda { [200, {}, ['Hello, world']] }
104
+ server = Capybara::Server.new(app)
105
+ Net::HTTP.should_receive(:start).and_raise(SystemCallError.allocate)
106
+ expect(server.responsive?).to eq false
107
+ end
101
108
  end
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,5 @@
1
- require 'capybara/spec/spec_helper'
1
+ require "capybara/spec/spec_helper"
2
+ require "pry"
2
3
 
3
4
  RSpec.configure do |config|
4
5
  Capybara::SpecHelper.configure(config)
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.3
4
+ version: 2.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Jonas Nicklas
9
9
  autorequire:
10
10
  bindir: bin
11
- cert_chain: []
12
- date: 2013-03-26 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - !binary |-
13
+ LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSURQRENDQWlTZ0F3SUJB
14
+ Z0lCQURBTkJna3Foa2lHOXcwQkFRVUZBREJFTVJZd0ZBWURWUVFEREExcWIy
15
+ NWgKY3k1dWFXTnJiR0Z6TVJVd0V3WUtDWkltaVpQeUxHUUJHUllGWjIxaGFX
16
+ d3hFekFSQmdvSmtpYUprL0lzWkFFWgpGZ05qYjIwd0hoY05NVE13TWpFMU1q
17
+ RTFOVE0yV2hjTk1UUXdNakUxTWpFMU5UTTJXakJFTVJZd0ZBWURWUVFECkRB
18
+ MXFiMjVoY3k1dWFXTnJiR0Z6TVJVd0V3WUtDWkltaVpQeUxHUUJHUllGWjIx
19
+ aGFXd3hFekFSQmdvSmtpYUoKay9Jc1pBRVpGZ05qYjIwd2dnRWlNQTBHQ1Nx
20
+ R1NJYjNEUUVCQVFVQUE0SUJEd0F3Z2dFS0FvSUJBUURiOUFaagpnTmRVS0lF
21
+ Rmt0blJUZXJmWXNDcXBBRlk5N3F0VGJydWo0dUVLSmV5SFJMUjRGTTNzVWU0
22
+ TjZZYjQ4YTNKTHBBCkhRMUVMaDVjU2RKZHl4OFRFWG1Lc2NycUVjYzJsWFNn
23
+ YmtvRnB5bzZJQWNFT1NwQzl2bEFleUdwd2tLSS8rYlAKYld3M2pWMjM2cTBD
24
+ cjdhRk1INm5tVXZKSnNhZE93TnlVWVpXQVRxT3Q2WDNRb0xpRXBoZjdTd2hM
25
+ ekFaSnI2ZgpIaHZqSjBYbzJ5L0xpSmo5TjBnb09oVUw2dEM1d3M1ajR3eFA4
26
+ WitZRlkwUTd4N1E2UlFCV2NDVWhjL0dBV2V4CjBlWFJqMlFPVHpWcnJJT25Q
27
+ TjFqcWlmbnFxVTMwWW9NRk1oL2U2bzN4L3ppWU1uN3pBYkZYU2J0WERLQ0s0
28
+ QlQKM3pHWmdDaXVlY3NwSHk5L0FnTUJBQUdqT1RBM01Ba0dBMVVkRXdRQ01B
29
+ QXdIUVlEVlIwT0JCWUVGUGI4K0RZMApmbTlCWmxkYy9lYUtaeGZJNlh1Y01B
30
+ c0dBMVVkRHdRRUF3SUVzREFOQmdrcWhraUc5dzBCQVFVRkFBT0NBUUVBCkp0
31
+ WnJqZDlEczVyY0JWUDJMOXZFYTZGMm9zZXE3eWU4YmF2UW85VWg4MWZEQ2JW
32
+ ZG5hWlBoeU10aDVRaGRJQkwKcEcrdWFmQ01BZmdVMHZRZU5YbkF6SXhtbHRu
33
+ UDQrZTNJd1IwT2UyMWVVRDZsU1BTdkNvSWFRMmVEVnhvSFBQSgo1TnJKS3hq
34
+ MnV1TlYxeUdMbVZoWFVGRVQwT2tWdkJnZHhObXRiRTJyUmJ4WGp2NXhxVzZu
35
+ QnNnVkF6MHFTeEIzCjl5RFRaS1c3KytFbSt5RnVmTWxEcjcrMXJsOGNUeHYx
36
+ S2o0M0dldTVMVno3bi9sSFlLQWRqZTR1SjNlQnRhZ0kKZHdDSTZtbGVYT3I0
37
+ TVNSZXpmMTlaVUZyMENxbEZjcnBCU3lPYWtTdFFMTThMYTNFQW1oT0VVYTJV
38
+ RTJGSWdxNQpSMVNIMW5pKzNiSDdCNHRBa2JXc2tnPT0KLS0tLS1FTkQgQ0VS
39
+ VElGSUNBVEUtLS0tLQo=
40
+ date: 2013-04-09 00:00:00.000000000 Z
13
41
  dependencies:
14
42
  - !ruby/object:Gem::Dependency
15
43
  name: nokogiri
@@ -44,29 +72,29 @@ dependencies:
44
72
  - !ruby/object:Gem::Version
45
73
  version: '1.16'
46
74
  - !ruby/object:Gem::Dependency
47
- name: selenium-webdriver
75
+ name: rack
48
76
  requirement: !ruby/object:Gem::Requirement
49
77
  none: false
50
78
  requirements:
51
- - - ~>
79
+ - - ! '>='
52
80
  - !ruby/object:Gem::Version
53
- version: '2.0'
81
+ version: 1.0.0
54
82
  type: :runtime
55
83
  prerelease: false
56
84
  version_requirements: !ruby/object:Gem::Requirement
57
85
  none: false
58
86
  requirements:
59
- - - ~>
87
+ - - ! '>='
60
88
  - !ruby/object:Gem::Version
61
- version: '2.0'
89
+ version: 1.0.0
62
90
  - !ruby/object:Gem::Dependency
63
- name: rack
91
+ name: rack-test
64
92
  requirement: !ruby/object:Gem::Requirement
65
93
  none: false
66
94
  requirements:
67
95
  - - ! '>='
68
96
  - !ruby/object:Gem::Version
69
- version: 1.0.0
97
+ version: 0.5.4
70
98
  type: :runtime
71
99
  prerelease: false
72
100
  version_requirements: !ruby/object:Gem::Requirement
@@ -74,39 +102,39 @@ dependencies:
74
102
  requirements:
75
103
  - - ! '>='
76
104
  - !ruby/object:Gem::Version
77
- version: 1.0.0
105
+ version: 0.5.4
78
106
  - !ruby/object:Gem::Dependency
79
- name: rack-test
107
+ name: xpath
80
108
  requirement: !ruby/object:Gem::Requirement
81
109
  none: false
82
110
  requirements:
83
- - - ! '>='
111
+ - - ~>
84
112
  - !ruby/object:Gem::Version
85
- version: 0.5.4
113
+ version: '2.0'
86
114
  type: :runtime
87
115
  prerelease: false
88
116
  version_requirements: !ruby/object:Gem::Requirement
89
117
  none: false
90
118
  requirements:
91
- - - ! '>='
119
+ - - ~>
92
120
  - !ruby/object:Gem::Version
93
- version: 0.5.4
121
+ version: '2.0'
94
122
  - !ruby/object:Gem::Dependency
95
- name: xpath
123
+ name: selenium-webdriver
96
124
  requirement: !ruby/object:Gem::Requirement
97
125
  none: false
98
126
  requirements:
99
127
  - - ~>
100
128
  - !ruby/object:Gem::Version
101
- version: 1.0.0
102
- type: :runtime
129
+ version: '2.0'
130
+ type: :development
103
131
  prerelease: false
104
132
  version_requirements: !ruby/object:Gem::Requirement
105
133
  none: false
106
134
  requirements:
107
135
  - - ~>
108
136
  - !ruby/object:Gem::Version
109
- version: 1.0.0
137
+ version: '2.0'
110
138
  - !ruby/object:Gem::Dependency
111
139
  name: sinatra
112
140
  requirement: !ruby/object:Gem::Requirement
@@ -219,6 +247,22 @@ dependencies:
219
247
  - - ! '>='
220
248
  - !ruby/object:Gem::Version
221
249
  version: '0'
250
+ - !ruby/object:Gem::Dependency
251
+ name: pry
252
+ requirement: !ruby/object:Gem::Requirement
253
+ none: false
254
+ requirements:
255
+ - - ! '>='
256
+ - !ruby/object:Gem::Version
257
+ version: '0'
258
+ type: :development
259
+ prerelease: false
260
+ version_requirements: !ruby/object:Gem::Requirement
261
+ none: false
262
+ requirements:
263
+ - - ! '>='
264
+ - !ruby/object:Gem::Version
265
+ version: '0'
222
266
  description: Capybara is an integration testing tool for rack based web applications.
223
267
  It simulates how a user would interact with a website
224
268
  email:
@@ -241,6 +285,7 @@ files:
241
285
  - lib/capybara/node/simple.rb
242
286
  - lib/capybara/query.rb
243
287
  - lib/capybara/rack_test/browser.rb
288
+ - lib/capybara/rack_test/css_handlers.rb
244
289
  - lib/capybara/rack_test/driver.rb
245
290
  - lib/capybara/rack_test/form.rb
246
291
  - lib/capybara/rack_test/node.rb
@@ -269,6 +314,7 @@ files:
269
314
  - lib/capybara/spec/session/click_button_spec.rb
270
315
  - lib/capybara/spec/session/click_link_or_button_spec.rb
271
316
  - lib/capybara/spec/session/click_link_spec.rb
317
+ - lib/capybara/spec/session/current_scope_spec.rb
272
318
  - lib/capybara/spec/session/current_url_spec.rb
273
319
  - lib/capybara/spec/session/evaluate_script_spec.rb
274
320
  - lib/capybara/spec/session/execute_script_spec.rb
@@ -287,6 +333,7 @@ files:
287
333
  - lib/capybara/spec/session/has_selector_spec.rb
288
334
  - lib/capybara/spec/session/has_table_spec.rb
289
335
  - lib/capybara/spec/session/has_text_spec.rb
336
+ - lib/capybara/spec/session/has_title_spec.rb
290
337
  - lib/capybara/spec/session/has_xpath_spec.rb
291
338
  - lib/capybara/spec/session/headers.rb
292
339
  - lib/capybara/spec/session/html_spec.rb
@@ -298,6 +345,7 @@ files:
298
345
  - lib/capybara/spec/session/select_spec.rb
299
346
  - lib/capybara/spec/session/source_spec.rb
300
347
  - lib/capybara/spec/session/text_spec.rb
348
+ - lib/capybara/spec/session/title_spec.rb
301
349
  - lib/capybara/spec/session/uncheck_spec.rb
302
350
  - lib/capybara/spec/session/unselect_spec.rb
303
351
  - lib/capybara/spec/session/visit_spec.rb
@@ -309,7 +357,9 @@ files:
309
357
  - lib/capybara/spec/views/buttons.erb
310
358
  - lib/capybara/spec/views/fieldsets.erb
311
359
  - lib/capybara/spec/views/form.erb
360
+ - lib/capybara/spec/views/frame_child.erb
312
361
  - lib/capybara/spec/views/frame_one.erb
362
+ - lib/capybara/spec/views/frame_parent.erb
313
363
  - lib/capybara/spec/views/frame_two.erb
314
364
  - lib/capybara/spec/views/header_links.erb
315
365
  - lib/capybara/spec/views/host_links.erb
@@ -317,11 +367,15 @@ files:
317
367
  - lib/capybara/spec/views/popup_two.erb
318
368
  - lib/capybara/spec/views/postback.erb
319
369
  - lib/capybara/spec/views/tables.erb
370
+ - lib/capybara/spec/views/with_base_tag.erb
371
+ - lib/capybara/spec/views/with_count.erb
372
+ - lib/capybara/spec/views/with_hover.erb
320
373
  - lib/capybara/spec/views/with_html.erb
321
374
  - lib/capybara/spec/views/with_html_entities.erb
322
375
  - lib/capybara/spec/views/with_js.erb
323
376
  - lib/capybara/spec/views/with_scope.erb
324
377
  - lib/capybara/spec/views/with_simple_html.erb
378
+ - lib/capybara/spec/views/with_title.erb
325
379
  - lib/capybara/spec/views/within_frames.erb
326
380
  - lib/capybara/spec/views/within_popups.erb
327
381
  - lib/capybara/version.rb
@@ -344,7 +398,13 @@ files:
344
398
  - License.txt
345
399
  homepage: http://github.com/jnicklas/capybara
346
400
  licenses: []
347
- post_install_message:
401
+ post_install_message: ! "IMPORTANT! Some of the defaults have changed in Capybara
402
+ 2.1. If you're experiencing failures,\nplease revert to the old behaviour by setting:\n\n
403
+ \ Capybara.configure do |config|\n config.match = :one\n config.exact_options
404
+ = true\n config.ignore_hidden_elements = true\n config.visible_text_only
405
+ = true\n end\n\nIf you're migrating from Capybara 1.x, try:\n\n Capybara.configure
406
+ do |config|\n config.match = :prefer_exact\n config.ignore_hidden_elements
407
+ = false\n end\n\nDetails here: http://www.elabs.se/blog/60-introducing-capybara-2-1\n\n"
348
408
  rdoc_options: []
349
409
  require_paths:
350
410
  - lib
@@ -353,7 +413,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
353
413
  requirements:
354
414
  - - ! '>='
355
415
  - !ruby/object:Gem::Version
356
- version: '0'
416
+ version: 1.9.3
357
417
  required_rubygems_version: !ruby/object:Gem::Requirement
358
418
  none: false
359
419
  requirements:
metadata.gz.sig ADDED
Binary file