capybara 1.1.0.rc1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +19 -6
- data/lib/capybara/version.rb +1 -1
- metadata +29 -29
data/README.rdoc
CHANGED
@@ -240,10 +240,11 @@ At the moment, Capybara supports {Selenium 2.0
|
|
240
240
|
*not* Selenium RC. Provided Firefox is installed, everything is set up for you,
|
241
241
|
and you should be able to start using Selenium right away.
|
242
242
|
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
243
|
+
Capybara can block and wait for Ajax requests to finish after you've interacted
|
244
|
+
with the page. To enable this behaviour, set the <tt>:resynchronize</tt> driver
|
245
|
+
option to <tt>true</tt>. This should normally not be necessary, since
|
246
|
+
Capybara's automatic reloading should take care of any asynchronicity problems.
|
247
|
+
See the section on Asynchronous JavaScript for details.
|
247
248
|
|
248
249
|
Note: Selenium does not support transactional fixtures; see the section
|
249
250
|
"Transactional Fixtures" below.
|
@@ -285,7 +286,7 @@ Note: Envjs does not support transactional fixtures; see the section
|
|
285
286
|
=== Capybara-webkit
|
286
287
|
|
287
288
|
The {capybara-webkit drive}[https://github.com/thoughtbot/capybara-webkit] is for true headless
|
288
|
-
testing. It uses WebKitQt to start a rendering engine process. It can execute JavaScript as well.
|
289
|
+
testing. It uses WebKitQt to start a rendering engine process. It can execute JavaScript as well.
|
289
290
|
It is significantly faster than drivers like Selenium since it does not load an entire browser.
|
290
291
|
|
291
292
|
You can install it with:
|
@@ -483,7 +484,7 @@ When issuing instructions to the DSL such as:
|
|
483
484
|
click_link('bar')
|
484
485
|
page.should have_content('baz')
|
485
486
|
|
486
|
-
If clicking on the *foo* link
|
487
|
+
If clicking on the *foo* link triggers an asynchronous process, such as
|
487
488
|
an Ajax request, which, when complete will add the *bar* link to the page,
|
488
489
|
clicking on the *bar* link would be expected to fail, since that link doesn't
|
489
490
|
exist yet. However Capybara is smart enought to retry finding the link for a
|
@@ -505,6 +506,18 @@ asynchronous process has not yet removed the element from the page, it would
|
|
505
506
|
therefore fail, even though the code might be working correctly. The latter
|
506
507
|
correctly waits for the element to disappear from the page.
|
507
508
|
|
509
|
+
Capybara's waiting behaviour is quite advanced, and can deal with situations
|
510
|
+
such as the following line of code:
|
511
|
+
|
512
|
+
find('#sidebar').find('h1').should have_content('Something')
|
513
|
+
|
514
|
+
Even if JavaScript causes <tt>#sidebar</tt> to disappear off the page, Capybara
|
515
|
+
will automatically reload it and any elements it contains. So if an AJAX
|
516
|
+
request causes the contents of <tt>#sidebar</tt> to change, which would update
|
517
|
+
the text of the <tt>h1</tt> to "Something", and this happened, this test would
|
518
|
+
pass. If you do not want this behaviour, you can set
|
519
|
+
<tt>Capybara.automatic_reload</tt> to <tt>false</tt>.
|
520
|
+
|
508
521
|
== Using the DSL in unsupported testing frameworks
|
509
522
|
|
510
523
|
You can mix the DSL into any context by including +Capybara::DSL+:
|
data/lib/capybara/version.rb
CHANGED
metadata
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.0
|
5
|
-
prerelease:
|
4
|
+
version: 1.1.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Jonas Nicklas
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-09-02 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
16
|
-
requirement: &
|
16
|
+
requirement: &2156882440 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.3.3
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *2156882440
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: mime-types
|
27
|
-
requirement: &
|
27
|
+
requirement: &2156881880 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '1.16'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *2156881880
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: selenium-webdriver
|
38
|
-
requirement: &
|
38
|
+
requirement: &2156881400 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '2.0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *2156881400
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: rack
|
49
|
-
requirement: &
|
49
|
+
requirement: &2156880920 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *2156880920
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rack-test
|
60
|
-
requirement: &
|
60
|
+
requirement: &2156786360 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.5.4
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *2156786360
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: xpath
|
71
|
-
requirement: &
|
71
|
+
requirement: &2156785820 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 0.1.4
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *2156785820
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sinatra
|
82
|
-
requirement: &
|
82
|
+
requirement: &2156785300 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.9.4
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *2156785300
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: rspec
|
93
|
-
requirement: &
|
93
|
+
requirement: &2156784720 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 2.0.0
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *2156784720
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: launchy
|
104
|
-
requirement: &
|
104
|
+
requirement: &2156784140 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: 2.0.4
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *2156784140
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: yard
|
115
|
-
requirement: &
|
115
|
+
requirement: &2156783560 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: 0.5.8
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *2156783560
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: fuubar
|
126
|
-
requirement: &
|
126
|
+
requirement: &2156783000 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ! '>='
|
@@ -131,10 +131,10 @@ dependencies:
|
|
131
131
|
version: 0.0.1
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *2156783000
|
135
135
|
- !ruby/object:Gem::Dependency
|
136
136
|
name: cucumber
|
137
|
-
requirement: &
|
137
|
+
requirement: &2156782520 !ruby/object:Gem::Requirement
|
138
138
|
none: false
|
139
139
|
requirements:
|
140
140
|
- - ! '>='
|
@@ -142,7 +142,7 @@ dependencies:
|
|
142
142
|
version: '0.10'
|
143
143
|
type: :development
|
144
144
|
prerelease: false
|
145
|
-
version_requirements: *
|
145
|
+
version_requirements: *2156782520
|
146
146
|
description: Capybara is an integration testing tool for rack based web applications.
|
147
147
|
It simulates how a user would interact with a website
|
148
148
|
email:
|
@@ -273,9 +273,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
273
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
274
274
|
none: false
|
275
275
|
requirements:
|
276
|
-
- - ! '
|
276
|
+
- - ! '>='
|
277
277
|
- !ruby/object:Gem::Version
|
278
|
-
version:
|
278
|
+
version: '0'
|
279
279
|
requirements: []
|
280
280
|
rubyforge_project: capybara
|
281
281
|
rubygems_version: 1.8.6
|