forked from rspec/rspec.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile.Capybara.html
73 lines (73 loc) · 2.86 KB
/
file.Capybara.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: Capybara
— Documentation by YARD 0.9.26
</title>
<link rel="stylesheet" href="/documentation/5.0/rspec-rails/css/style.css" type="text/css" />
<link rel="stylesheet" href="/documentation/5.0/rspec-rails/css/common.css" type="text/css" />
<link rel="stylesheet" href="/documentation/5.0/rspec-rails/css/rspec.css" type="text/css" />
<script type="text/javascript">
pathId = "Capybara";
relpath = '';
</script>
<script type="text/javascript" charset="utf-8" src="/documentation/5.0/rspec-rails/js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="/documentation/5.0/rspec-rails/js/app.js"></script>
</head>
<body>
<div class="nav_wrap">
<iframe id="nav" src="file_list.html?1"></iframe>
<div id="resizer"></div>
</div>
<div id="main" tabindex="-1">
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> »
<span class="title">File: Capybara</span>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
<svg width="24" height="24">
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
</svg>
</a>
</div>
<div class="clear"></div>
</div>
<div id="content"><div id='filecontents'><p>rspec-rails supports integration with Capybara out of the box by adding
its Capybara::DSL (visit/page) and Capybara::RSpecMatchers to the
examples in the applicable directories.</p>
<h2 id="capybara-dsl">Capybara::DSL</h2>
<p>Adds the <code>visit</code> and <code>page</code> methods, which work together to simulate a
GET request and provide access to the result (via <code>page</code>).</p>
<p>Capybara::DSL is added to examples in:</p>
<ul>
<li>spec/features</li>
</ul>
<h2 id="capybara-rspecmatchers">Capybara::RSpecMatchers</h2>
<p>Exposes matchers used to specify expected HTML content (e.g. <code>should_not have_selector</code> will work correctly).</p>
<p>Capybara::RSpecMatchers is added to examples in:</p>
<ul>
<li>spec/features</li>
<li>spec/controllers</li>
<li>spec/views</li>
<li>spec/helpers</li>
<li>spec/mailers</li>
</ul>
<h2 id="upgrading-to-capybara-3-x">Upgrading to Capybara-3.x</h2>
<p>Consult the official <a href="https://github.com/teamcapybara/capybara/blob/master/UPGRADING.md#upgrading-from-capybara-2x-to-3x">Upgrading from Capybara 2.x to 3.x</a> guide.</p>
</div></div>
<div id="footer">
Generated on Thu Mar 18 12:51:31 2021 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.26 (ruby-2.7.2).
</div>
</div>
</body>
</html>