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