elabs_matchers 0.0.7 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +3 -6
- data/{development.txt → development.md} +2 -2
- data/doc/ElabsMatchers/Helpers/Fixtures.html +46 -46
- data/doc/ElabsMatchers/Helpers/NormalizeKeys.html +45 -45
- data/doc/ElabsMatchers/Helpers/ReloadRecord.html +45 -45
- data/doc/ElabsMatchers/Helpers/SelectYearAndMonth.html +48 -48
- data/doc/ElabsMatchers/Helpers.html +40 -40
- data/doc/ElabsMatchers/Matchers/{Allow/AllowMatcher.html → BeValidWith/BeValidWithMatcher.html} +150 -85
- data/doc/ElabsMatchers/Matchers/BeValidWith.html +229 -0
- data/doc/ElabsMatchers/Matchers/ContainHash/ContainHashMatcher.html +80 -67
- data/doc/ElabsMatchers/Matchers/ContainHash.html +51 -51
- data/doc/ElabsMatchers/Matchers/HaveAttribute/HaveAttributeMatcher.html +108 -95
- data/doc/ElabsMatchers/Matchers/HaveAttribute.html +49 -49
- data/doc/ElabsMatchers/Matchers/HaveFields/HaveFieldsMatcher.html +103 -90
- data/doc/ElabsMatchers/Matchers/HaveFields.html +50 -50
- data/doc/ElabsMatchers/Matchers/HaveFlash/HaveFlashMatcher.html +108 -95
- data/doc/ElabsMatchers/Matchers/HaveFlash.html +57 -57
- data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn/HaveFormErrorsOnMatcher.html +110 -97
- data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn.html +49 -49
- data/doc/ElabsMatchers/Matchers/HaveHeader/HaveHeaderMatcher.html +103 -90
- data/doc/ElabsMatchers/Matchers/HaveHeader.html +49 -49
- data/doc/ElabsMatchers/Matchers/HaveImage/HaveImageMatcher.html +104 -91
- data/doc/ElabsMatchers/Matchers/HaveImage.html +49 -49
- data/doc/ElabsMatchers/Matchers/OnlyInclude/OnlyIncludeMatcher.html +79 -66
- data/doc/ElabsMatchers/Matchers/OnlyInclude.html +50 -50
- data/doc/ElabsMatchers/Matchers/Persist/PersistMatcher.html +134 -69
- data/doc/ElabsMatchers/Matchers/Persist.html +49 -49
- data/doc/ElabsMatchers/Matchers.html +42 -42
- data/doc/ElabsMatchers.html +143 -144
- data/doc/_index.html +35 -52
- data/doc/class_list.html +25 -27
- data/doc/css/full_list.css +32 -31
- data/doc/css/style.css +262 -91
- data/doc/file.README.html +91 -87
- data/doc/file_list.html +27 -26
- data/doc/frames.html +10 -21
- data/doc/index.html +91 -87
- data/doc/js/app.js +106 -72
- data/doc/js/full_list.js +170 -127
- data/doc/method_list.html +456 -505
- data/doc/top-level-namespace.html +36 -38
- data/elabs_matchers.gemspec +2 -2
- data/history.txt +11 -0
- data/lib/elabs_matchers/helpers/normalize_keys.rb +1 -1
- data/lib/elabs_matchers/helpers/select_year_and_month.rb +1 -0
- data/lib/elabs_matchers/matchers/be_valid_with.rb +5 -10
- data/lib/elabs_matchers/matchers/contain_hash.rb +4 -2
- data/lib/elabs_matchers/matchers/have_attribute.rb +5 -2
- data/lib/elabs_matchers/matchers/have_fields.rb +5 -2
- data/lib/elabs_matchers/matchers/have_flash.rb +5 -2
- data/lib/elabs_matchers/matchers/have_form_errors_on.rb +5 -2
- data/lib/elabs_matchers/matchers/have_header.rb +5 -2
- data/lib/elabs_matchers/matchers/have_image.rb +5 -2
- data/lib/elabs_matchers/matchers/only_include.rb +14 -2
- data/lib/elabs_matchers/matchers/persist.rb +8 -2
- data/lib/elabs_matchers/version.rb +1 -1
- data/lib/elabs_matchers.rb +0 -1
- data/spec/elabs_matchers/matchers/only_include_spec.rb +13 -0
- data/spec/elabs_matchers/matchers/persist_spec.rb +1 -1
- data/spec/spec_helper.rb +7 -0
- metadata +8 -29
- data/doc/Cucumber.html +0 -116
- data/doc/ElabsMatchers/Cucumber/Common.html +0 -145
- data/doc/ElabsMatchers/Cucumber.html +0 -108
- data/doc/ElabsMatchers/Helpers/Capybara.html +0 -241
- data/doc/ElabsMatchers/Helpers/Common.html +0 -213
- data/doc/ElabsMatchers/Helpers/Orm.html +0 -289
- data/doc/ElabsMatchers/Helpers/Session.html +0 -497
- data/doc/ElabsMatchers/Matchers/Allow.html +0 -229
- data/doc/ElabsMatchers/Matchers/Capybara/Common.html +0 -1159
- data/doc/ElabsMatchers/Matchers/Capybara.html +0 -108
- data/doc/ElabsMatchers/Matchers/HaveTableRow/HaveTableRowMatcher.html +0 -654
- data/doc/ElabsMatchers/Matchers/HaveTableRow.html +0 -236
- data/doc/ElabsMatchers/Matchers/Rspec/Allow.html +0 -98
- data/doc/ElabsMatchers/Matchers/Rspec/Common.html +0 -332
- data/doc/ElabsMatchers/Matchers/Rspec/Orm.html +0 -231
- data/doc/ElabsMatchers/Matchers/Rspec.html +0 -110
- data/doc/ElabsMatchers/Orm/Post.html +0 -1041
- data/doc/ElabsMatchers/Orm.html +0 -108
- data/lib/elabs_matchers/matchers/have_table_row.rb +0 -124
- data/spec/elabs_matchers/matchers/have_table_row_spec.rb +0 -119
@@ -1,236 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Module: ElabsMatchers::Matchers::HaveTableRow
|
8
|
-
|
9
|
-
— Documentation by YARD 0.8.2.1
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
hasFrames = window.top.frames.main ? true : false;
|
19
|
-
relpath = '../../';
|
20
|
-
framesUrl = "../../frames.html#!" + escape(window.location.href);
|
21
|
-
</script>
|
22
|
-
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
|
25
|
-
|
26
|
-
<script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
|
27
|
-
|
28
|
-
|
29
|
-
</head>
|
30
|
-
<body>
|
31
|
-
<div id="header">
|
32
|
-
<div id="menu">
|
33
|
-
|
34
|
-
<a href="../../_index.html">Index (H)</a> »
|
35
|
-
<span class='title'><span class='object_link'><a href="../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> » <span class='title'><span class='object_link'><a href="../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span>
|
36
|
-
»
|
37
|
-
<span class="title">HaveTableRow</span>
|
38
|
-
|
39
|
-
|
40
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
-
</div>
|
42
|
-
|
43
|
-
<div id="search">
|
44
|
-
|
45
|
-
<a class="full_list_link" id="class_list_link"
|
46
|
-
href="../../class_list.html">
|
47
|
-
Class List
|
48
|
-
</a>
|
49
|
-
|
50
|
-
<a class="full_list_link" id="method_list_link"
|
51
|
-
href="../../method_list.html">
|
52
|
-
Method List
|
53
|
-
</a>
|
54
|
-
|
55
|
-
<a class="full_list_link" id="file_list_link"
|
56
|
-
href="../../file_list.html">
|
57
|
-
File List
|
58
|
-
</a>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
<div class="clear"></div>
|
62
|
-
</div>
|
63
|
-
|
64
|
-
<iframe id="search_frame"></iframe>
|
65
|
-
|
66
|
-
<div id="content"><h1>Module: ElabsMatchers::Matchers::HaveTableRow
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
</h1>
|
71
|
-
|
72
|
-
<dl class="box">
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
<dt class="r1 last">Defined in:</dt>
|
82
|
-
<dd class="r1 last">lib/elabs_matchers/matchers/have_table_row.rb</dd>
|
83
|
-
|
84
|
-
</dl>
|
85
|
-
<div class="clear"></div>
|
86
|
-
|
87
|
-
<h2>Defined Under Namespace</h2>
|
88
|
-
<p class="children">
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="HaveTableRow/HaveTableRowMatcher.html" title="ElabsMatchers::Matchers::HaveTableRow::HaveTableRowMatcher (class)">HaveTableRowMatcher</a></span>
|
94
|
-
|
95
|
-
|
96
|
-
</p>
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
<h2>
|
106
|
-
Instance Method Summary
|
107
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
108
|
-
</h2>
|
109
|
-
|
110
|
-
<ul class="summary">
|
111
|
-
|
112
|
-
<li class="public ">
|
113
|
-
<span class="summary_signature">
|
114
|
-
|
115
|
-
<a href="#have_table_row-instance_method" title="#have_table_row (instance method)">- (Object) <strong>have_table_row</strong>(table_name, row) </a>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
</span>
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<span class="summary_desc"><div class='inline'>
|
130
|
-
<p>Asserts if the supplied table row exists in the table.</p>
|
131
|
-
</div></span>
|
132
|
-
|
133
|
-
</li>
|
134
|
-
|
135
|
-
|
136
|
-
</ul>
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<div id="instance_method_details" class="method_details_list">
|
142
|
-
<h2>Instance Method Details</h2>
|
143
|
-
|
144
|
-
|
145
|
-
<div class="method_details first">
|
146
|
-
<h3 class="signature first" id="have_table_row-instance_method">
|
147
|
-
|
148
|
-
- (<tt>Object</tt>) <strong>have_table_row</strong>(table_name, row)
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
</h3><div class="docstring">
|
155
|
-
<div class="discussion">
|
156
|
-
|
157
|
-
<p>Asserts if the supplied table row exists in the table</p>
|
158
|
-
|
159
|
-
<p>Example: table.should have_table_row("Posts", "Title" => "First", :year
|
160
|
-
=> "2012")</p>
|
161
|
-
|
162
|
-
|
163
|
-
</div>
|
164
|
-
</div>
|
165
|
-
<div class="tags">
|
166
|
-
<p class="tag_title">Parameters:</p>
|
167
|
-
<ul class="param">
|
168
|
-
|
169
|
-
<li>
|
170
|
-
|
171
|
-
<span class='name'>table_name</span>
|
172
|
-
|
173
|
-
|
174
|
-
<span class='type'>(<tt>String</tt>)</span>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
—
|
179
|
-
<div class='inline'>
|
180
|
-
<p>The tables's caption text.</p>
|
181
|
-
</div>
|
182
|
-
|
183
|
-
</li>
|
184
|
-
|
185
|
-
<li>
|
186
|
-
|
187
|
-
<span class='name'>row</span>
|
188
|
-
|
189
|
-
|
190
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
—
|
195
|
-
<div class='inline'>
|
196
|
-
<p>A hash representing the column name and value in key-value form.</p>
|
197
|
-
</div>
|
198
|
-
|
199
|
-
</li>
|
200
|
-
|
201
|
-
</ul>
|
202
|
-
|
203
|
-
|
204
|
-
</div><table class="source_code">
|
205
|
-
<tr>
|
206
|
-
<td>
|
207
|
-
<pre class="lines">
|
208
|
-
|
209
|
-
|
210
|
-
108
|
211
|
-
109
|
212
|
-
110</pre>
|
213
|
-
</td>
|
214
|
-
<td>
|
215
|
-
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/have_table_row.rb', line 108</span>
|
216
|
-
|
217
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_have_table_row'>have_table_row</span><span class='lparen'>(</span><span class='id identifier rubyid_table_name'>table_name</span><span class='comma'>,</span> <span class='id identifier rubyid_row'>row</span><span class='rparen'>)</span>
|
218
|
-
<span class='const'>HaveTableRowMatcher</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_table_name'>table_name</span><span class='comma'>,</span> <span class='id identifier rubyid_row'>row</span><span class='rparen'>)</span>
|
219
|
-
<span class='kw'>end</span></pre>
|
220
|
-
</td>
|
221
|
-
</tr>
|
222
|
-
</table>
|
223
|
-
</div>
|
224
|
-
|
225
|
-
</div>
|
226
|
-
|
227
|
-
</div>
|
228
|
-
|
229
|
-
<div id="footer">
|
230
|
-
Generated on Wed Sep 19 15:04:26 2012 by
|
231
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
232
|
-
0.8.2.1 (ruby-1.9.3).
|
233
|
-
</div>
|
234
|
-
|
235
|
-
</body>
|
236
|
-
</html>
|
@@ -1,98 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Module: ElabsMatchers::Matchers::Rspec::Allow
|
8
|
-
|
9
|
-
— Documentation by YARD 0.7.5
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
relpath = '../../..';
|
19
|
-
if (relpath != '') relpath += '/';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
25
|
-
|
26
|
-
|
27
|
-
</head>
|
28
|
-
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
|
-
<div id="header">
|
34
|
-
<div id="menu">
|
35
|
-
|
36
|
-
<a href="../../../_index.html">Index (A)</a> »
|
37
|
-
<span class='title'><span class='object_link'><a href="../../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> » <span class='title'><span class='object_link'><a href="../../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span> » <span class='title'><span class='object_link'><a href="../Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span></span>
|
38
|
-
»
|
39
|
-
<span class="title">Allow</span>
|
40
|
-
|
41
|
-
|
42
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div id="search">
|
46
|
-
|
47
|
-
<a id="class_list_link" href="#">Class List</a>
|
48
|
-
|
49
|
-
<a id="method_list_link" href="#">Method List</a>
|
50
|
-
|
51
|
-
<a id="file_list_link" href="#">File List</a>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
<div class="clear"></div>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<iframe id="search_frame"></iframe>
|
58
|
-
|
59
|
-
<div id="content"><h1>Module: ElabsMatchers::Matchers::Rspec::Allow
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</h1>
|
64
|
-
|
65
|
-
<dl class="box">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/allow.rb</dd>
|
76
|
-
|
77
|
-
</dl>
|
78
|
-
<div class="clear"></div>
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
</div>
|
90
|
-
|
91
|
-
<div id="footer">
|
92
|
-
Generated on Fri Feb 17 16:29:16 2012 by
|
93
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
94
|
-
0.7.5 (ruby-1.9.3).
|
95
|
-
</div>
|
96
|
-
|
97
|
-
</body>
|
98
|
-
</html>
|
@@ -1,332 +0,0 @@
|
|
1
|
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
2
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
|
-
<head>
|
5
|
-
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
Module: ElabsMatchers::Matchers::Rspec::Common
|
8
|
-
|
9
|
-
— Documentation by YARD 0.7.5
|
10
|
-
|
11
|
-
</title>
|
12
|
-
|
13
|
-
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
-
|
15
|
-
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
-
|
17
|
-
<script type="text/javascript" charset="utf-8">
|
18
|
-
relpath = '../../..';
|
19
|
-
if (relpath != '') relpath += '/';
|
20
|
-
</script>
|
21
|
-
|
22
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
23
|
-
|
24
|
-
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
25
|
-
|
26
|
-
|
27
|
-
</head>
|
28
|
-
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
|
-
<div id="header">
|
34
|
-
<div id="menu">
|
35
|
-
|
36
|
-
<a href="../../../_index.html">Index (C)</a> »
|
37
|
-
<span class='title'><span class='object_link'><a href="../../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> » <span class='title'><span class='object_link'><a href="../../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span> » <span class='title'><span class='object_link'><a href="../Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span></span>
|
38
|
-
»
|
39
|
-
<span class="title">Common</span>
|
40
|
-
|
41
|
-
|
42
|
-
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
|
-
</div>
|
44
|
-
|
45
|
-
<div id="search">
|
46
|
-
|
47
|
-
<a id="class_list_link" href="#">Class List</a>
|
48
|
-
|
49
|
-
<a id="method_list_link" href="#">Method List</a>
|
50
|
-
|
51
|
-
<a id="file_list_link" href="#">File List</a>
|
52
|
-
|
53
|
-
</div>
|
54
|
-
<div class="clear"></div>
|
55
|
-
</div>
|
56
|
-
|
57
|
-
<iframe id="search_frame"></iframe>
|
58
|
-
|
59
|
-
<div id="content"><h1>Module: ElabsMatchers::Matchers::Rspec::Common
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
</h1>
|
64
|
-
|
65
|
-
<dl class="box">
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/common.rb</dd>
|
76
|
-
|
77
|
-
</dl>
|
78
|
-
<div class="clear"></div>
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
<h2>
|
89
|
-
Instance Method Summary
|
90
|
-
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
91
|
-
</h2>
|
92
|
-
|
93
|
-
<ul class="summary">
|
94
|
-
|
95
|
-
<li class="public ">
|
96
|
-
<span class="summary_signature">
|
97
|
-
|
98
|
-
<a href="#contain_hash-instance_method" title="#contain_hash (instance method)">- (Object) <strong>contain_hash</strong> </a>
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
</span>
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
<span class="summary_desc"><div class='inline'>
|
112
|
-
<p>Asserts if the hash contains the supplied hash.</p>
|
113
|
-
</div></span>
|
114
|
-
|
115
|
-
</li>
|
116
|
-
|
117
|
-
|
118
|
-
<li class="public ">
|
119
|
-
<span class="summary_signature">
|
120
|
-
|
121
|
-
<a href="#only_include-instance_method" title="#only_include (instance method)">- (Object) <strong>only_include</strong> </a>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
</span>
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
<span class="summary_desc"><div class='inline'>
|
135
|
-
<p>Asserts if the array contains exactly the supplied elements.</p>
|
136
|
-
</div></span>
|
137
|
-
|
138
|
-
</li>
|
139
|
-
|
140
|
-
|
141
|
-
</ul>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
<div id="instance_method_details" class="method_details_list">
|
147
|
-
<h2>Instance Method Details</h2>
|
148
|
-
|
149
|
-
|
150
|
-
<div class="method_details first">
|
151
|
-
<p class="signature first" id="contain_hash-instance_method">
|
152
|
-
|
153
|
-
- (<tt>Object</tt>) <strong>contain_hash</strong>
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
</p><div class="docstring">
|
158
|
-
<div class="discussion">
|
159
|
-
|
160
|
-
<p>Asserts if the hash contains the supplied hash. Works with nested hashes
|
161
|
-
and array of hashes.</p>
|
162
|
-
|
163
|
-
<p>Example: { "foo" => ['quox', { 'bar' => 'baz'}]}.should
|
164
|
-
contain_hash({ "foo" => [{ "bar" => "baz" }]}) { "foo" => "bar",
|
165
|
-
"baz" => "quox" }.should_not contain_hash({ "baz" => "bar" })</p>
|
166
|
-
|
167
|
-
|
168
|
-
</div>
|
169
|
-
</div>
|
170
|
-
<div class="tags">
|
171
|
-
<h3>Parameters:</h3>
|
172
|
-
<ul class="param">
|
173
|
-
|
174
|
-
<li>
|
175
|
-
|
176
|
-
<span class='name'>options</span>
|
177
|
-
|
178
|
-
|
179
|
-
<span class='type'>(<tt>Hash</tt>)</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
—
|
184
|
-
<div class='inline'>
|
185
|
-
<p>Key => value pairs seperated by comma</p>
|
186
|
-
</div>
|
187
|
-
|
188
|
-
</li>
|
189
|
-
|
190
|
-
</ul>
|
191
|
-
|
192
|
-
|
193
|
-
</div><table class="source_code">
|
194
|
-
<tr>
|
195
|
-
<td>
|
196
|
-
<pre class="lines">
|
197
|
-
|
198
|
-
|
199
|
-
16
|
200
|
-
17
|
201
|
-
18
|
202
|
-
19
|
203
|
-
20
|
204
|
-
21
|
205
|
-
22
|
206
|
-
23
|
207
|
-
24
|
208
|
-
25
|
209
|
-
26
|
210
|
-
27
|
211
|
-
28
|
212
|
-
29
|
213
|
-
30
|
214
|
-
31
|
215
|
-
32
|
216
|
-
33
|
217
|
-
34
|
218
|
-
35
|
219
|
-
36
|
220
|
-
37
|
221
|
-
38</pre>
|
222
|
-
</td>
|
223
|
-
<td>
|
224
|
-
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/rspec/common.rb', line 16</span>
|
225
|
-
|
226
|
-
<span class='const'>RSpec</span><span class='op'>::</span><span class='const'>Matchers</span><span class='period'>.</span><span class='id identifier rubyid_define'>define</span> <span class='symbol'>:contain_hash</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_expected'>expected</span><span class='op'>|</span>
|
227
|
-
<span class='id identifier rubyid_match'>match</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span>
|
228
|
-
<span class='id identifier rubyid_contains?'>contains?</span><span class='lparen'>(</span><span class='id identifier rubyid_expected'>expected</span><span class='comma'>,</span> <span class='id identifier rubyid_actual'>actual</span><span class='rparen'>)</span>
|
229
|
-
<span class='kw'>end</span>
|
230
|
-
|
231
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_contains?'>contains?</span><span class='lparen'>(</span><span class='id identifier rubyid_expected'>expected</span><span class='comma'>,</span> <span class='id identifier rubyid_actual'>actual</span><span class='rparen'>)</span>
|
232
|
-
<span class='kw'>return</span> <span class='kw'>false</span> <span class='kw'>unless</span> <span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
|
233
|
-
|
234
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
235
|
-
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_expected_value'>expected_value</span><span class='op'>|</span>
|
236
|
-
<span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_any?'>any?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_actual_value'>actual_value</span><span class='op'>|</span>
|
237
|
-
<span class='id identifier rubyid_contains?'>contains?</span><span class='lparen'>(</span><span class='id identifier rubyid_expected_value'>expected_value</span><span class='comma'>,</span> <span class='id identifier rubyid_actual_value'>actual_value</span><span class='rparen'>)</span>
|
238
|
-
<span class='kw'>end</span>
|
239
|
-
<span class='kw'>end</span>
|
240
|
-
<span class='kw'>elsif</span> <span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Hash</span><span class='rparen'>)</span>
|
241
|
-
<span class='id identifier rubyid_expected'>expected</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
242
|
-
<span class='id identifier rubyid_contains?'>contains?</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_actual'>actual</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
243
|
-
<span class='kw'>end</span>
|
244
|
-
<span class='kw'>else</span>
|
245
|
-
<span class='id identifier rubyid_actual'>actual</span> <span class='op'>==</span> <span class='id identifier rubyid_expected'>expected</span>
|
246
|
-
<span class='kw'>end</span>
|
247
|
-
<span class='kw'>end</span>
|
248
|
-
<span class='kw'>end</span></pre>
|
249
|
-
</td>
|
250
|
-
</tr>
|
251
|
-
</table>
|
252
|
-
</div>
|
253
|
-
|
254
|
-
<div class="method_details ">
|
255
|
-
<p class="signature " id="only_include-instance_method">
|
256
|
-
|
257
|
-
- (<tt>Object</tt>) <strong>only_include</strong>
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
</p><div class="docstring">
|
262
|
-
<div class="discussion">
|
263
|
-
|
264
|
-
<p>Asserts if the array contains exactly the supplied elements. The order of
|
265
|
-
the element do not have to match.</p>
|
266
|
-
|
267
|
-
<p>Example: ["foo", "bar"].should only_include("bar", "foo") ["foo",
|
268
|
-
"bar"].should_not only_include("foo")</p>
|
269
|
-
|
270
|
-
|
271
|
-
</div>
|
272
|
-
</div>
|
273
|
-
<div class="tags">
|
274
|
-
<h3>Parameters:</h3>
|
275
|
-
<ul class="param">
|
276
|
-
|
277
|
-
<li>
|
278
|
-
|
279
|
-
<span class='name'>argument</span>
|
280
|
-
|
281
|
-
|
282
|
-
<span class='type'></span>
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
—
|
287
|
-
<div class='inline'>
|
288
|
-
<p>list options comma seperated list of arguments</p>
|
289
|
-
</div>
|
290
|
-
|
291
|
-
</li>
|
292
|
-
|
293
|
-
</ul>
|
294
|
-
|
295
|
-
|
296
|
-
</div><table class="source_code">
|
297
|
-
<tr>
|
298
|
-
<td>
|
299
|
-
<pre class="lines">
|
300
|
-
|
301
|
-
|
302
|
-
51
|
303
|
-
52
|
304
|
-
53
|
305
|
-
54
|
306
|
-
55</pre>
|
307
|
-
</td>
|
308
|
-
<td>
|
309
|
-
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/rspec/common.rb', line 51</span>
|
310
|
-
|
311
|
-
<span class='const'>RSpec</span><span class='op'>::</span><span class='const'>Matchers</span><span class='period'>.</span><span class='id identifier rubyid_define'>define</span> <span class='symbol'>:only_include</span> <span class='kw'>do</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_collection'>collection</span><span class='op'>|</span>
|
312
|
-
<span class='id identifier rubyid_match'>match</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span> <span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='kw'>and</span> <span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_element'>element</span><span class='op'>|</span> <span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='rparen'>)</span> <span class='rbrace'>}</span> <span class='rbrace'>}</span>
|
313
|
-
<span class='id identifier rubyid_failure_message_for_should'>failure_message_for_should</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> to only include </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span>
|
314
|
-
<span class='id identifier rubyid_failure_message_for_should_not'>failure_message_for_should_not</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> to not only include </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_collection'>collection</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'>, but it did.</span><span class='tstring_end'>"</span></span> <span class='rbrace'>}</span>
|
315
|
-
<span class='kw'>end</span></pre>
|
316
|
-
</td>
|
317
|
-
</tr>
|
318
|
-
</table>
|
319
|
-
</div>
|
320
|
-
|
321
|
-
</div>
|
322
|
-
|
323
|
-
</div>
|
324
|
-
|
325
|
-
<div id="footer">
|
326
|
-
Generated on Fri Feb 17 16:29:16 2012 by
|
327
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
328
|
-
0.7.5 (ruby-1.9.3).
|
329
|
-
</div>
|
330
|
-
|
331
|
-
</body>
|
332
|
-
</html>
|