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.
Files changed (82) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +3 -6
  3. data/{development.txt → development.md} +2 -2
  4. data/doc/ElabsMatchers/Helpers/Fixtures.html +46 -46
  5. data/doc/ElabsMatchers/Helpers/NormalizeKeys.html +45 -45
  6. data/doc/ElabsMatchers/Helpers/ReloadRecord.html +45 -45
  7. data/doc/ElabsMatchers/Helpers/SelectYearAndMonth.html +48 -48
  8. data/doc/ElabsMatchers/Helpers.html +40 -40
  9. data/doc/ElabsMatchers/Matchers/{Allow/AllowMatcher.html → BeValidWith/BeValidWithMatcher.html} +150 -85
  10. data/doc/ElabsMatchers/Matchers/BeValidWith.html +229 -0
  11. data/doc/ElabsMatchers/Matchers/ContainHash/ContainHashMatcher.html +80 -67
  12. data/doc/ElabsMatchers/Matchers/ContainHash.html +51 -51
  13. data/doc/ElabsMatchers/Matchers/HaveAttribute/HaveAttributeMatcher.html +108 -95
  14. data/doc/ElabsMatchers/Matchers/HaveAttribute.html +49 -49
  15. data/doc/ElabsMatchers/Matchers/HaveFields/HaveFieldsMatcher.html +103 -90
  16. data/doc/ElabsMatchers/Matchers/HaveFields.html +50 -50
  17. data/doc/ElabsMatchers/Matchers/HaveFlash/HaveFlashMatcher.html +108 -95
  18. data/doc/ElabsMatchers/Matchers/HaveFlash.html +57 -57
  19. data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn/HaveFormErrorsOnMatcher.html +110 -97
  20. data/doc/ElabsMatchers/Matchers/HaveFormErrorsOn.html +49 -49
  21. data/doc/ElabsMatchers/Matchers/HaveHeader/HaveHeaderMatcher.html +103 -90
  22. data/doc/ElabsMatchers/Matchers/HaveHeader.html +49 -49
  23. data/doc/ElabsMatchers/Matchers/HaveImage/HaveImageMatcher.html +104 -91
  24. data/doc/ElabsMatchers/Matchers/HaveImage.html +49 -49
  25. data/doc/ElabsMatchers/Matchers/OnlyInclude/OnlyIncludeMatcher.html +79 -66
  26. data/doc/ElabsMatchers/Matchers/OnlyInclude.html +50 -50
  27. data/doc/ElabsMatchers/Matchers/Persist/PersistMatcher.html +134 -69
  28. data/doc/ElabsMatchers/Matchers/Persist.html +49 -49
  29. data/doc/ElabsMatchers/Matchers.html +42 -42
  30. data/doc/ElabsMatchers.html +143 -144
  31. data/doc/_index.html +35 -52
  32. data/doc/class_list.html +25 -27
  33. data/doc/css/full_list.css +32 -31
  34. data/doc/css/style.css +262 -91
  35. data/doc/file.README.html +91 -87
  36. data/doc/file_list.html +27 -26
  37. data/doc/frames.html +10 -21
  38. data/doc/index.html +91 -87
  39. data/doc/js/app.js +106 -72
  40. data/doc/js/full_list.js +170 -127
  41. data/doc/method_list.html +456 -505
  42. data/doc/top-level-namespace.html +36 -38
  43. data/elabs_matchers.gemspec +2 -2
  44. data/history.txt +11 -0
  45. data/lib/elabs_matchers/helpers/normalize_keys.rb +1 -1
  46. data/lib/elabs_matchers/helpers/select_year_and_month.rb +1 -0
  47. data/lib/elabs_matchers/matchers/be_valid_with.rb +5 -10
  48. data/lib/elabs_matchers/matchers/contain_hash.rb +4 -2
  49. data/lib/elabs_matchers/matchers/have_attribute.rb +5 -2
  50. data/lib/elabs_matchers/matchers/have_fields.rb +5 -2
  51. data/lib/elabs_matchers/matchers/have_flash.rb +5 -2
  52. data/lib/elabs_matchers/matchers/have_form_errors_on.rb +5 -2
  53. data/lib/elabs_matchers/matchers/have_header.rb +5 -2
  54. data/lib/elabs_matchers/matchers/have_image.rb +5 -2
  55. data/lib/elabs_matchers/matchers/only_include.rb +14 -2
  56. data/lib/elabs_matchers/matchers/persist.rb +8 -2
  57. data/lib/elabs_matchers/version.rb +1 -1
  58. data/lib/elabs_matchers.rb +0 -1
  59. data/spec/elabs_matchers/matchers/only_include_spec.rb +13 -0
  60. data/spec/elabs_matchers/matchers/persist_spec.rb +1 -1
  61. data/spec/spec_helper.rb +7 -0
  62. metadata +8 -29
  63. data/doc/Cucumber.html +0 -116
  64. data/doc/ElabsMatchers/Cucumber/Common.html +0 -145
  65. data/doc/ElabsMatchers/Cucumber.html +0 -108
  66. data/doc/ElabsMatchers/Helpers/Capybara.html +0 -241
  67. data/doc/ElabsMatchers/Helpers/Common.html +0 -213
  68. data/doc/ElabsMatchers/Helpers/Orm.html +0 -289
  69. data/doc/ElabsMatchers/Helpers/Session.html +0 -497
  70. data/doc/ElabsMatchers/Matchers/Allow.html +0 -229
  71. data/doc/ElabsMatchers/Matchers/Capybara/Common.html +0 -1159
  72. data/doc/ElabsMatchers/Matchers/Capybara.html +0 -108
  73. data/doc/ElabsMatchers/Matchers/HaveTableRow/HaveTableRowMatcher.html +0 -654
  74. data/doc/ElabsMatchers/Matchers/HaveTableRow.html +0 -236
  75. data/doc/ElabsMatchers/Matchers/Rspec/Allow.html +0 -98
  76. data/doc/ElabsMatchers/Matchers/Rspec/Common.html +0 -332
  77. data/doc/ElabsMatchers/Matchers/Rspec/Orm.html +0 -231
  78. data/doc/ElabsMatchers/Matchers/Rspec.html +0 -110
  79. data/doc/ElabsMatchers/Orm/Post.html +0 -1041
  80. data/doc/ElabsMatchers/Orm.html +0 -108
  81. data/lib/elabs_matchers/matchers/have_table_row.rb +0 -124
  82. 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
- &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">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" =&gt; "First", :year
160
- =&gt; "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
- &mdash;
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
- &mdash;
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
- &mdash; 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> &raquo;
37
- <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="../Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span></span>
38
- &raquo;
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
- &mdash; 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> &raquo;
37
- <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="../Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span></span>
38
- &raquo;
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" =&gt; ['quox', { 'bar' =&gt; 'baz'}]}.should
164
- contain_hash({ "foo" =&gt; [{ "bar" =&gt; "baz" }]}) { "foo" =&gt; "bar",
165
- "baz" =&gt; "quox" }.should_not contain_hash({ "baz" =&gt; "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
- &mdash;
184
- <div class='inline'>
185
- <p>Key =&gt; 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
- &mdash;
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'>&quot;</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'>&quot;</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'>&quot;</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'>&quot;</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>