elabs_matchers 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -1
- data/Gemfile.lock +37 -26
- data/README.md +57 -47
- data/development.txt +26 -0
- data/doc/ElabsMatchers/Helpers/Fixtures.html +33 -23
- data/doc/ElabsMatchers/Helpers/NormalizeKeys.html +222 -0
- data/doc/ElabsMatchers/Helpers/ReloadRecord.html +302 -0
- data/doc/ElabsMatchers/Helpers/SelectYearAndMonth.html +251 -0
- data/doc/ElabsMatchers/Helpers.html +29 -22
- data/doc/ElabsMatchers/Matchers/Allow/AllowMatcher.html +707 -0
- data/doc/ElabsMatchers/Matchers/Allow.html +229 -0
- data/doc/ElabsMatchers/Matchers/ContainHash/ContainHashMatcher.html +506 -0
- data/doc/ElabsMatchers/Matchers/ContainHash.html +222 -0
- data/doc/ElabsMatchers/Matchers/HaveAttribute/HaveAttributeMatcher.html +656 -0
- data/doc/ElabsMatchers/Matchers/HaveAttribute.html +239 -0
- data/doc/ElabsMatchers/Matchers/HaveFields/HaveFieldsMatcher.html +572 -0
- data/doc/ElabsMatchers/Matchers/HaveFields.html +220 -0
- data/doc/ElabsMatchers/Matchers/HaveFlash/HaveFlashMatcher.html +654 -0
- data/doc/ElabsMatchers/Matchers/HaveFlash.html +306 -0
- data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn/HaveFormErrorsOnMatcher.html +678 -0
- data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn.html +236 -0
- data/doc/ElabsMatchers/Matchers/HaveHeader/HaveHeaderMatcher.html +568 -0
- data/doc/ElabsMatchers/Matchers/HaveHeader.html +219 -0
- data/doc/ElabsMatchers/Matchers/HaveImage/HaveImageMatcher.html +592 -0
- data/doc/ElabsMatchers/Matchers/HaveImage.html +219 -0
- data/doc/ElabsMatchers/Matchers/HaveTableRow/HaveTableRowMatcher.html +654 -0
- data/doc/ElabsMatchers/Matchers/HaveTableRow.html +236 -0
- data/doc/ElabsMatchers/Matchers/OnlyInclude/OnlyIncludeMatcher.html +494 -0
- data/doc/ElabsMatchers/Matchers/OnlyInclude.html +221 -0
- data/doc/ElabsMatchers/Matchers/Persist/PersistMatcher.html +586 -0
- data/doc/ElabsMatchers/Matchers/Persist.html +235 -0
- data/doc/ElabsMatchers/Matchers.html +29 -22
- data/doc/ElabsMatchers.html +1144 -21
- data/doc/_index.html +161 -79
- data/doc/class_list.html +12 -6
- data/doc/css/full_list.css +4 -2
- data/doc/css/style.css +50 -44
- data/doc/file.README.html +71 -73
- data/doc/file_list.html +12 -6
- data/doc/frames.html +20 -5
- data/doc/index.html +71 -73
- data/doc/js/app.js +52 -43
- data/doc/js/full_list.js +9 -9
- data/doc/js/jquery.js +4 -16
- data/doc/method_list.html +603 -77
- data/doc/top-level-namespace.html +24 -103
- data/elabs_matchers.gemspec +4 -3
- data/history.txt +15 -0
- data/lib/elabs_matchers/extensions/module.rb +24 -0
- data/lib/elabs_matchers/helpers/fixtures.rb +2 -2
- data/lib/elabs_matchers/helpers/{common.rb → normalize_keys.rb} +3 -4
- data/lib/elabs_matchers/helpers/{orm.rb → reload_record.rb} +9 -6
- data/lib/elabs_matchers/helpers/{capybara.rb → select_year_and_month.rb} +5 -3
- data/lib/elabs_matchers/matchers/allow.rb +130 -0
- data/lib/elabs_matchers/matchers/contain_hash.rb +58 -0
- data/lib/elabs_matchers/matchers/have_attribute.rb +62 -0
- data/lib/elabs_matchers/matchers/have_fields.rb +45 -0
- data/lib/elabs_matchers/matchers/have_flash.rb +65 -0
- data/lib/elabs_matchers/matchers/have_form_errors_on.rb +79 -0
- data/lib/elabs_matchers/matchers/have_header.rb +53 -0
- data/lib/elabs_matchers/matchers/have_image.rb +69 -0
- data/lib/elabs_matchers/matchers/have_table_row.rb +113 -0
- data/lib/elabs_matchers/matchers/only_include.rb +41 -0
- data/lib/elabs_matchers/matchers/persist.rb +42 -0
- data/lib/elabs_matchers/version.rb +1 -1
- data/lib/elabs_matchers.rb +90 -10
- data/spec/elabs_matchers/helpers/fixtures_spec.rb +1 -1
- data/spec/elabs_matchers/helpers/{common_spec.rb → normalize_keys_spec.rb} +2 -2
- data/spec/elabs_matchers/helpers/{orm_spec.rb → reload_record_spec.rb} +3 -2
- data/spec/elabs_matchers/helpers/select_year_and_month_spec.rb +32 -0
- data/spec/elabs_matchers/matchers/{rspec/allow_spec.rb → allow_spec.rb} +5 -4
- data/spec/elabs_matchers/matchers/contain_hash_spec.rb +86 -0
- data/spec/elabs_matchers/matchers/have_attribute_spec.rb +65 -0
- data/spec/elabs_matchers/matchers/have_fields_spec.rb +46 -0
- data/spec/elabs_matchers/matchers/have_flash_spec.rb +97 -0
- data/spec/elabs_matchers/matchers/have_form_errors_on_spec.rb +93 -0
- data/spec/elabs_matchers/matchers/have_header_spec.rb +54 -0
- data/spec/elabs_matchers/matchers/have_image_spec.rb +49 -0
- data/spec/elabs_matchers/matchers/have_table_row_spec.rb +119 -0
- data/spec/elabs_matchers/matchers/only_include_spec.rb +32 -0
- data/spec/elabs_matchers/matchers/persist_spec.rb +21 -0
- data/{lib/elabs_matchers/orm → spec/fixtures}/post.rb +0 -0
- data/spec/spec_helper.rb +19 -8
- data/todo.txt +6 -0
- metadata +104 -48
- data/lib/elabs_matchers/cucumber/common.rb +0 -57
- data/lib/elabs_matchers/helpers/session.rb +0 -81
- data/lib/elabs_matchers/matchers/capybara/common.rb +0 -245
- data/lib/elabs_matchers/matchers/rspec/allow.rb +0 -112
- data/lib/elabs_matchers/matchers/rspec/common.rb +0 -59
- data/lib/elabs_matchers/matchers/rspec/orm.rb +0 -29
- data/spec/elabs_matchers/cucumber/common_spec.rb +0 -49
- data/spec/elabs_matchers/helpers/capybara_spec.rb +0 -32
- data/spec/elabs_matchers/helpers/session_spec.rb +0 -35
- data/spec/elabs_matchers/matchers/capybara/common_spec.rb +0 -202
- data/spec/elabs_matchers/matchers/rspec/common_spec.rb +0 -74
- data/spec/elabs_matchers/matchers/rspec/orm_spec.rb +0 -16
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Module: ElabsMatchers::Helpers
|
8
8
|
|
9
|
-
— Documentation by YARD 0.
|
9
|
+
— Documentation by YARD 0.8.2.1
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -15,10 +15,12 @@
|
|
15
15
|
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
16
|
|
17
17
|
<script type="text/javascript" charset="utf-8">
|
18
|
-
|
19
|
-
|
18
|
+
hasFrames = window.top.frames.main ? true : false;
|
19
|
+
relpath = '../';
|
20
|
+
framesUrl = "../frames.html#!" + escape(window.location.href);
|
20
21
|
</script>
|
21
22
|
|
23
|
+
|
22
24
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
23
25
|
|
24
26
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
@@ -26,36 +28,41 @@
|
|
26
28
|
|
27
29
|
</head>
|
28
30
|
<body>
|
29
|
-
<script type="text/javascript" charset="utf-8">
|
30
|
-
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
-
</script>
|
32
|
-
|
33
31
|
<div id="header">
|
34
32
|
<div id="menu">
|
35
33
|
|
36
|
-
<a href="../_index.html">Index (H)</a> »
|
34
|
+
<a href="../_index.html">Index (H)</a> »
|
37
35
|
<span class='title'><span class='object_link'><a href="../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span>
|
38
36
|
»
|
39
37
|
<span class="title">Helpers</span>
|
40
38
|
|
41
|
-
|
39
|
+
|
42
40
|
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
43
41
|
</div>
|
44
42
|
|
45
43
|
<div id="search">
|
46
44
|
|
47
|
-
<a
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="../class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
48
49
|
|
49
|
-
<a
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="../method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
50
54
|
|
51
|
-
<a
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="../file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
52
59
|
|
53
60
|
</div>
|
54
61
|
<div class="clear"></div>
|
55
62
|
</div>
|
56
|
-
|
63
|
+
|
57
64
|
<iframe id="search_frame"></iframe>
|
58
|
-
|
65
|
+
|
59
66
|
<div id="content"><h1>Module: ElabsMatchers::Helpers
|
60
67
|
|
61
68
|
|
@@ -72,8 +79,8 @@
|
|
72
79
|
|
73
80
|
|
74
81
|
<dt class="r1 last">Defined in:</dt>
|
75
|
-
<dd class="r1 last">lib/elabs_matchers/helpers/
|
76
|
-
lib/elabs_matchers/helpers/
|
82
|
+
<dd class="r1 last">lib/elabs_matchers/helpers/fixtures.rb<span class="defines">,<br />
|
83
|
+
lib/elabs_matchers/helpers/reload_record.rb,<br /> lib/elabs_matchers/helpers/normalize_keys.rb,<br /> lib/elabs_matchers/helpers/select_year_and_month.rb</span>
|
77
84
|
</dd>
|
78
85
|
|
79
86
|
</dl>
|
@@ -81,11 +88,11 @@
|
|
81
88
|
|
82
89
|
<h2>Defined Under Namespace</h2>
|
83
90
|
<p class="children">
|
84
|
-
|
91
|
+
|
85
92
|
|
86
|
-
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Helpers/
|
93
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Helpers/Fixtures.html" title="ElabsMatchers::Helpers::Fixtures (module)">Fixtures</a></span>, <span class='object_link'><a href="Helpers/NormalizeKeys.html" title="ElabsMatchers::Helpers::NormalizeKeys (module)">NormalizeKeys</a></span>, <span class='object_link'><a href="Helpers/ReloadRecord.html" title="ElabsMatchers::Helpers::ReloadRecord (module)">ReloadRecord</a></span>, <span class='object_link'><a href="Helpers/SelectYearAndMonth.html" title="ElabsMatchers::Helpers::SelectYearAndMonth (module)">SelectYearAndMonth</a></span>
|
87
94
|
|
88
|
-
|
95
|
+
|
89
96
|
|
90
97
|
|
91
98
|
</p>
|
@@ -99,11 +106,11 @@
|
|
99
106
|
|
100
107
|
|
101
108
|
</div>
|
102
|
-
|
109
|
+
|
103
110
|
<div id="footer">
|
104
|
-
Generated on
|
111
|
+
Generated on Wed Sep 19 15:04:26 2012 by
|
105
112
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
106
|
-
0.
|
113
|
+
0.8.2.1 (ruby-1.9.3).
|
107
114
|
</div>
|
108
115
|
|
109
116
|
</body>
|
@@ -0,0 +1,707 @@
|
|
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
|
+
Class: ElabsMatchers::Matchers::Allow::AllowMatcher
|
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 (A)</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> » <span class='title'><span class='object_link'><a href="../Allow.html" title="ElabsMatchers::Matchers::Allow (module)">Allow</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">AllowMatcher</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>Class: ElabsMatchers::Matchers::Allow::AllowMatcher
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">ElabsMatchers::Matchers::Allow::AllowMatcher</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/elabs_matchers/matchers/allow.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
107
|
+
<ul class="summary">
|
108
|
+
|
109
|
+
<li class="public ">
|
110
|
+
<span class="summary_signature">
|
111
|
+
|
112
|
+
<a href="#attributes-instance_method" title="#attributes (instance method)">- (Object) <strong>attributes</strong> </a>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</span>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
<span class="note title readonly">readonly</span>
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
<span class="summary_desc"><div class='inline'>
|
132
|
+
<p>Returns the value of attribute attributes.</p>
|
133
|
+
</div></span>
|
134
|
+
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="public ">
|
139
|
+
<span class="summary_signature">
|
140
|
+
|
141
|
+
<a href="#record-instance_method" title="#record (instance method)">- (Object) <strong>record</strong> </a>
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
</span>
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<span class="note title readonly">readonly</span>
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<span class="summary_desc"><div class='inline'>
|
161
|
+
<p>Returns the value of attribute record.</p>
|
162
|
+
</div></span>
|
163
|
+
|
164
|
+
</li>
|
165
|
+
|
166
|
+
|
167
|
+
</ul>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<h2>
|
174
|
+
Instance Method Summary
|
175
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
176
|
+
</h2>
|
177
|
+
|
178
|
+
<ul class="summary">
|
179
|
+
|
180
|
+
<li class="public ">
|
181
|
+
<span class="summary_signature">
|
182
|
+
|
183
|
+
<a href="#as-instance_method" title="#as (instance method)">- (Object) <strong>as</strong>(*attributes) </a>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
</span>
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
<span class="summary_desc"><div class='inline'>
|
198
|
+
<p>Tell the matcher which attributes to check.</p>
|
199
|
+
</div></span>
|
200
|
+
|
201
|
+
</li>
|
202
|
+
|
203
|
+
|
204
|
+
<li class="public ">
|
205
|
+
<span class="summary_signature">
|
206
|
+
|
207
|
+
<a href="#does_not_match%3F-instance_method" title="#does_not_match? (instance method)">- (Boolean) <strong>does_not_match?</strong>(record) </a>
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
</span>
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
222
|
+
|
223
|
+
</li>
|
224
|
+
|
225
|
+
|
226
|
+
<li class="public ">
|
227
|
+
<span class="summary_signature">
|
228
|
+
|
229
|
+
<a href="#failure_message_for_should-instance_method" title="#failure_message_for_should (instance method)">- (Object) <strong>failure_message_for_should</strong> </a>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
</span>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
|
243
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
244
|
+
|
245
|
+
</li>
|
246
|
+
|
247
|
+
|
248
|
+
<li class="public ">
|
249
|
+
<span class="summary_signature">
|
250
|
+
|
251
|
+
<a href="#failure_message_for_should_not-instance_method" title="#failure_message_for_should_not (instance method)">- (Object) <strong>failure_message_for_should_not</strong> </a>
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
</span>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
266
|
+
|
267
|
+
</li>
|
268
|
+
|
269
|
+
|
270
|
+
<li class="public ">
|
271
|
+
<span class="summary_signature">
|
272
|
+
|
273
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (AllowMatcher) <strong>initialize</strong>(values) </a>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
</span>
|
278
|
+
|
279
|
+
|
280
|
+
<span class="note title constructor">constructor</span>
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
<span class="summary_desc"><div class='inline'>
|
290
|
+
<p>A new instance of AllowMatcher.</p>
|
291
|
+
</div></span>
|
292
|
+
|
293
|
+
</li>
|
294
|
+
|
295
|
+
|
296
|
+
<li class="public ">
|
297
|
+
<span class="summary_signature">
|
298
|
+
|
299
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">- (Boolean) <strong>matches?</strong>(record) </a>
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
</span>
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
314
|
+
|
315
|
+
</li>
|
316
|
+
|
317
|
+
|
318
|
+
</ul>
|
319
|
+
|
320
|
+
|
321
|
+
<div id="constructor_details" class="method_details_list">
|
322
|
+
<h2>Constructor Details</h2>
|
323
|
+
|
324
|
+
<div class="method_details first">
|
325
|
+
<h3 class="signature first" id="initialize-instance_method">
|
326
|
+
|
327
|
+
- (<tt><span class='object_link'><a href="" title="ElabsMatchers::Matchers::Allow::AllowMatcher (class)">AllowMatcher</a></span></tt>) <strong>initialize</strong>(values)
|
328
|
+
|
329
|
+
|
330
|
+
|
331
|
+
|
332
|
+
|
333
|
+
</h3><div class="docstring">
|
334
|
+
<div class="discussion">
|
335
|
+
|
336
|
+
<p>A new instance of AllowMatcher</p>
|
337
|
+
|
338
|
+
|
339
|
+
</div>
|
340
|
+
</div>
|
341
|
+
<div class="tags">
|
342
|
+
|
343
|
+
|
344
|
+
</div><table class="source_code">
|
345
|
+
<tr>
|
346
|
+
<td>
|
347
|
+
<pre class="lines">
|
348
|
+
|
349
|
+
|
350
|
+
10
|
351
|
+
11
|
352
|
+
12</pre>
|
353
|
+
</td>
|
354
|
+
<td>
|
355
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 10</span>
|
356
|
+
|
357
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
358
|
+
<span class='ivar'>@values</span> <span class='op'>=</span> <span class='id identifier rubyid_values'>values</span>
|
359
|
+
<span class='kw'>end</span></pre>
|
360
|
+
</td>
|
361
|
+
</tr>
|
362
|
+
</table>
|
363
|
+
</div>
|
364
|
+
|
365
|
+
</div>
|
366
|
+
|
367
|
+
<div id="instance_attr_details" class="attr_details">
|
368
|
+
<h2>Instance Attribute Details</h2>
|
369
|
+
|
370
|
+
|
371
|
+
<span id=""></span>
|
372
|
+
<div class="method_details first">
|
373
|
+
<h3 class="signature first" id="attributes-instance_method">
|
374
|
+
|
375
|
+
- (<tt>Object</tt>) <strong>attributes</strong> <span class="extras">(readonly)</span>
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
</h3><div class="docstring">
|
382
|
+
<div class="discussion">
|
383
|
+
|
384
|
+
<p>Returns the value of attribute attributes</p>
|
385
|
+
|
386
|
+
|
387
|
+
</div>
|
388
|
+
</div>
|
389
|
+
<div class="tags">
|
390
|
+
|
391
|
+
|
392
|
+
</div><table class="source_code">
|
393
|
+
<tr>
|
394
|
+
<td>
|
395
|
+
<pre class="lines">
|
396
|
+
|
397
|
+
|
398
|
+
8
|
399
|
+
9
|
400
|
+
10</pre>
|
401
|
+
</td>
|
402
|
+
<td>
|
403
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 8</span>
|
404
|
+
|
405
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_attributes'>attributes</span>
|
406
|
+
<span class='ivar'>@attributes</span>
|
407
|
+
<span class='kw'>end</span></pre>
|
408
|
+
</td>
|
409
|
+
</tr>
|
410
|
+
</table>
|
411
|
+
</div>
|
412
|
+
|
413
|
+
|
414
|
+
<span id=""></span>
|
415
|
+
<div class="method_details ">
|
416
|
+
<h3 class="signature " id="record-instance_method">
|
417
|
+
|
418
|
+
- (<tt>Object</tt>) <strong>record</strong> <span class="extras">(readonly)</span>
|
419
|
+
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</h3><div class="docstring">
|
425
|
+
<div class="discussion">
|
426
|
+
|
427
|
+
<p>Returns the value of attribute record</p>
|
428
|
+
|
429
|
+
|
430
|
+
</div>
|
431
|
+
</div>
|
432
|
+
<div class="tags">
|
433
|
+
|
434
|
+
|
435
|
+
</div><table class="source_code">
|
436
|
+
<tr>
|
437
|
+
<td>
|
438
|
+
<pre class="lines">
|
439
|
+
|
440
|
+
|
441
|
+
8
|
442
|
+
9
|
443
|
+
10</pre>
|
444
|
+
</td>
|
445
|
+
<td>
|
446
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 8</span>
|
447
|
+
|
448
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_record'>record</span>
|
449
|
+
<span class='ivar'>@record</span>
|
450
|
+
<span class='kw'>end</span></pre>
|
451
|
+
</td>
|
452
|
+
</tr>
|
453
|
+
</table>
|
454
|
+
</div>
|
455
|
+
|
456
|
+
</div>
|
457
|
+
|
458
|
+
|
459
|
+
<div id="instance_method_details" class="method_details_list">
|
460
|
+
<h2>Instance Method Details</h2>
|
461
|
+
|
462
|
+
|
463
|
+
<div class="method_details first">
|
464
|
+
<h3 class="signature first" id="as-instance_method">
|
465
|
+
|
466
|
+
- (<tt>Object</tt>) <strong>as</strong>(*attributes)
|
467
|
+
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
</h3><div class="docstring">
|
473
|
+
<div class="discussion">
|
474
|
+
|
475
|
+
<p>Tell the matcher which attributes to check</p>
|
476
|
+
|
477
|
+
<p>Example: post.should allow("Elabs").as(:title)</p>
|
478
|
+
|
479
|
+
|
480
|
+
</div>
|
481
|
+
</div>
|
482
|
+
<div class="tags">
|
483
|
+
<p class="tag_title">Parameters:</p>
|
484
|
+
<ul class="param">
|
485
|
+
|
486
|
+
<li>
|
487
|
+
|
488
|
+
<span class='name'>attributes</span>
|
489
|
+
|
490
|
+
|
491
|
+
<span class='type'>(<tt>*Array</tt>)</span>
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
—
|
496
|
+
<div class='inline'>
|
497
|
+
<p>The method name(s) that has the validation(s) attached to it</p>
|
498
|
+
</div>
|
499
|
+
|
500
|
+
</li>
|
501
|
+
|
502
|
+
</ul>
|
503
|
+
|
504
|
+
|
505
|
+
</div><table class="source_code">
|
506
|
+
<tr>
|
507
|
+
<td>
|
508
|
+
<pre class="lines">
|
509
|
+
|
510
|
+
|
511
|
+
33
|
512
|
+
34
|
513
|
+
35
|
514
|
+
36</pre>
|
515
|
+
</td>
|
516
|
+
<td>
|
517
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 33</span>
|
518
|
+
|
519
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_as'>as</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rparen'>)</span>
|
520
|
+
<span class='ivar'>@attributes</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='op'>*</span><span class='id identifier rubyid_attributes'>attributes</span><span class='rbracket'>]</span>
|
521
|
+
<span class='kw'>self</span>
|
522
|
+
<span class='kw'>end</span></pre>
|
523
|
+
</td>
|
524
|
+
</tr>
|
525
|
+
</table>
|
526
|
+
</div>
|
527
|
+
|
528
|
+
<div class="method_details ">
|
529
|
+
<h3 class="signature " id="does_not_match?-instance_method">
|
530
|
+
|
531
|
+
- (<tt>Boolean</tt>) <strong>does_not_match?</strong>(record)
|
532
|
+
|
533
|
+
|
534
|
+
|
535
|
+
|
536
|
+
|
537
|
+
</h3><div class="docstring">
|
538
|
+
<div class="discussion">
|
539
|
+
|
540
|
+
|
541
|
+
</div>
|
542
|
+
</div>
|
543
|
+
<div class="tags">
|
544
|
+
|
545
|
+
<p class="tag_title">Returns:</p>
|
546
|
+
<ul class="return">
|
547
|
+
|
548
|
+
<li>
|
549
|
+
|
550
|
+
|
551
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
552
|
+
|
553
|
+
|
554
|
+
|
555
|
+
</li>
|
556
|
+
|
557
|
+
</ul>
|
558
|
+
|
559
|
+
</div><table class="source_code">
|
560
|
+
<tr>
|
561
|
+
<td>
|
562
|
+
<pre class="lines">
|
563
|
+
|
564
|
+
|
565
|
+
19
|
566
|
+
20
|
567
|
+
21
|
568
|
+
22</pre>
|
569
|
+
</td>
|
570
|
+
<td>
|
571
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 19</span>
|
572
|
+
|
573
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_does_not_match?'>does_not_match?</span><span class='lparen'>(</span><span class='id identifier rubyid_record'>record</span><span class='rparen'>)</span>
|
574
|
+
<span class='ivar'>@record</span> <span class='op'>=</span> <span class='id identifier rubyid_record'>record</span>
|
575
|
+
<span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_all?'>all?</span> <span class='kw'>and</span> <span class='id identifier rubyid_correct_number_of_errors?'>correct_number_of_errors?</span>
|
576
|
+
<span class='kw'>end</span></pre>
|
577
|
+
</td>
|
578
|
+
</tr>
|
579
|
+
</table>
|
580
|
+
</div>
|
581
|
+
|
582
|
+
<div class="method_details ">
|
583
|
+
<h3 class="signature " id="failure_message_for_should-instance_method">
|
584
|
+
|
585
|
+
- (<tt>Object</tt>) <strong>failure_message_for_should</strong>
|
586
|
+
|
587
|
+
|
588
|
+
|
589
|
+
|
590
|
+
|
591
|
+
</h3><table class="source_code">
|
592
|
+
<tr>
|
593
|
+
<td>
|
594
|
+
<pre class="lines">
|
595
|
+
|
596
|
+
|
597
|
+
38
|
598
|
+
39
|
599
|
+
40</pre>
|
600
|
+
</td>
|
601
|
+
<td>
|
602
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 38</span>
|
603
|
+
|
604
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure_message_for_should'>failure_message_for_should</span>
|
605
|
+
<span class='id identifier rubyid_common_failure_message'>common_failure_message</span><span class='lparen'>(</span><span class='symbol'>:valid</span><span class='rparen'>)</span>
|
606
|
+
<span class='kw'>end</span></pre>
|
607
|
+
</td>
|
608
|
+
</tr>
|
609
|
+
</table>
|
610
|
+
</div>
|
611
|
+
|
612
|
+
<div class="method_details ">
|
613
|
+
<h3 class="signature " id="failure_message_for_should_not-instance_method">
|
614
|
+
|
615
|
+
- (<tt>Object</tt>) <strong>failure_message_for_should_not</strong>
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
</h3><table class="source_code">
|
622
|
+
<tr>
|
623
|
+
<td>
|
624
|
+
<pre class="lines">
|
625
|
+
|
626
|
+
|
627
|
+
42
|
628
|
+
43
|
629
|
+
44</pre>
|
630
|
+
</td>
|
631
|
+
<td>
|
632
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 42</span>
|
633
|
+
|
634
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure_message_for_should_not'>failure_message_for_should_not</span>
|
635
|
+
<span class='id identifier rubyid_common_failure_message'>common_failure_message</span><span class='lparen'>(</span><span class='symbol'>:invalid</span><span class='rparen'>)</span>
|
636
|
+
<span class='kw'>end</span></pre>
|
637
|
+
</td>
|
638
|
+
</tr>
|
639
|
+
</table>
|
640
|
+
</div>
|
641
|
+
|
642
|
+
<div class="method_details ">
|
643
|
+
<h3 class="signature " id="matches?-instance_method">
|
644
|
+
|
645
|
+
- (<tt>Boolean</tt>) <strong>matches?</strong>(record)
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
</h3><div class="docstring">
|
652
|
+
<div class="discussion">
|
653
|
+
|
654
|
+
|
655
|
+
</div>
|
656
|
+
</div>
|
657
|
+
<div class="tags">
|
658
|
+
|
659
|
+
<p class="tag_title">Returns:</p>
|
660
|
+
<ul class="return">
|
661
|
+
|
662
|
+
<li>
|
663
|
+
|
664
|
+
|
665
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
666
|
+
|
667
|
+
|
668
|
+
|
669
|
+
</li>
|
670
|
+
|
671
|
+
</ul>
|
672
|
+
|
673
|
+
</div><table class="source_code">
|
674
|
+
<tr>
|
675
|
+
<td>
|
676
|
+
<pre class="lines">
|
677
|
+
|
678
|
+
|
679
|
+
14
|
680
|
+
15
|
681
|
+
16
|
682
|
+
17</pre>
|
683
|
+
</td>
|
684
|
+
<td>
|
685
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/allow.rb', line 14</span>
|
686
|
+
|
687
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_matches?'>matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_record'>record</span><span class='rparen'>)</span>
|
688
|
+
<span class='ivar'>@record</span> <span class='op'>=</span> <span class='id identifier rubyid_record'>record</span>
|
689
|
+
<span class='id identifier rubyid_errors'>errors</span><span class='period'>.</span><span class='id identifier rubyid_none?'>none?</span>
|
690
|
+
<span class='kw'>end</span></pre>
|
691
|
+
</td>
|
692
|
+
</tr>
|
693
|
+
</table>
|
694
|
+
</div>
|
695
|
+
|
696
|
+
</div>
|
697
|
+
|
698
|
+
</div>
|
699
|
+
|
700
|
+
<div id="footer">
|
701
|
+
Generated on Wed Sep 19 15:04:27 2012 by
|
702
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
703
|
+
0.8.2.1 (ruby-1.9.3).
|
704
|
+
</div>
|
705
|
+
|
706
|
+
</body>
|
707
|
+
</html>
|