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
@@ -0,0 +1,221 @@
|
|
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::OnlyInclude
|
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 (O)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> » <span class='title'><span class='object_link'><a href="../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">OnlyInclude</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::OnlyInclude
|
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/only_include.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="OnlyInclude/OnlyIncludeMatcher.html" title="ElabsMatchers::Matchers::OnlyInclude::OnlyIncludeMatcher (class)">OnlyIncludeMatcher</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="#only_include-instance_method" title="#only_include (instance method)">- (Object) <strong>only_include</strong>(*elements) </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 array contains exactly the supplied elements.</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="only_include-instance_method">
|
147
|
+
|
148
|
+
- (<tt>Object</tt>) <strong>only_include</strong>(*elements)
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
</h3><div class="docstring">
|
155
|
+
<div class="discussion">
|
156
|
+
|
157
|
+
<p>Asserts if the array contains exactly the supplied elements. The order of
|
158
|
+
the element do not have to match.</p>
|
159
|
+
|
160
|
+
<p>Example: ["foo", "bar"].should only_include("bar", "foo") ["foo",
|
161
|
+
"bar"].should_not only_include("foo")</p>
|
162
|
+
|
163
|
+
|
164
|
+
</div>
|
165
|
+
</div>
|
166
|
+
<div class="tags">
|
167
|
+
<p class="tag_title">Parameters:</p>
|
168
|
+
<ul class="param">
|
169
|
+
|
170
|
+
<li>
|
171
|
+
|
172
|
+
<span class='name'>elements</span>
|
173
|
+
|
174
|
+
|
175
|
+
<span class='type'>(<tt>*Array</tt>)</span>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
—
|
180
|
+
<div class='inline'>
|
181
|
+
<p>Comma seperated list of arguments</p>
|
182
|
+
</div>
|
183
|
+
|
184
|
+
</li>
|
185
|
+
|
186
|
+
</ul>
|
187
|
+
|
188
|
+
|
189
|
+
</div><table class="source_code">
|
190
|
+
<tr>
|
191
|
+
<td>
|
192
|
+
<pre class="lines">
|
193
|
+
|
194
|
+
|
195
|
+
36
|
196
|
+
37
|
197
|
+
38</pre>
|
198
|
+
</td>
|
199
|
+
<td>
|
200
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/only_include.rb', line 36</span>
|
201
|
+
|
202
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_only_include'>only_include</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_elements'>elements</span><span class='rparen'>)</span>
|
203
|
+
<span class='const'>OnlyIncludeMatcher</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_elements'>elements</span><span class='rparen'>)</span>
|
204
|
+
<span class='kw'>end</span></pre>
|
205
|
+
</td>
|
206
|
+
</tr>
|
207
|
+
</table>
|
208
|
+
</div>
|
209
|
+
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</div>
|
213
|
+
|
214
|
+
<div id="footer">
|
215
|
+
Generated on Wed Sep 19 15:04:26 2012 by
|
216
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
217
|
+
0.8.2.1 (ruby-1.9.3).
|
218
|
+
</div>
|
219
|
+
|
220
|
+
</body>
|
221
|
+
</html>
|
@@ -0,0 +1,586 @@
|
|
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::Persist::PersistMatcher
|
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 (P)</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="../Persist.html" title="ElabsMatchers::Matchers::Persist (module)">Persist</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">PersistMatcher</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::Persist::PersistMatcher
|
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::Persist::PersistMatcher</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/persist.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="#attribute-instance_method" title="#attribute (instance method)">- (Object) <strong>attribute</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 attribute.</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
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#value-instance_method" title="#value (instance method)">- (Object) <strong>value</strong> </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
<span class="summary_desc"><div class='inline'>
|
188
|
+
<p>Returns the value of attribute value.</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="#failure_message_for_should-instance_method" title="#failure_message_for_should (instance method)">- (Object) <strong>failure_message_for_should</strong> </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_not-instance_method" title="#failure_message_for_should_not (instance method)">- (Object) <strong>failure_message_for_should_not</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="#matches%3F-instance_method" title="#matches? (instance method)">- (Boolean) <strong>matches?</strong>(record) </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
|
+
</ul>
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
<div id="instance_attr_details" class="attr_details">
|
279
|
+
<h2>Instance Attribute Details</h2>
|
280
|
+
|
281
|
+
|
282
|
+
<span id="attribute=-instance_method"></span>
|
283
|
+
<div class="method_details first">
|
284
|
+
<h3 class="signature first" id="attribute-instance_method">
|
285
|
+
|
286
|
+
- (<tt>Object</tt>) <strong>attribute</strong>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
</h3><div class="docstring">
|
293
|
+
<div class="discussion">
|
294
|
+
|
295
|
+
<p>Returns the value of attribute attribute</p>
|
296
|
+
|
297
|
+
|
298
|
+
</div>
|
299
|
+
</div>
|
300
|
+
<div class="tags">
|
301
|
+
|
302
|
+
<p class="tag_title">Returns:</p>
|
303
|
+
<ul class="return">
|
304
|
+
|
305
|
+
<li>
|
306
|
+
|
307
|
+
|
308
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
—
|
313
|
+
<div class='inline'>
|
314
|
+
<p>the current value of attribute</p>
|
315
|
+
</div>
|
316
|
+
|
317
|
+
</li>
|
318
|
+
|
319
|
+
</ul>
|
320
|
+
|
321
|
+
</div><table class="source_code">
|
322
|
+
<tr>
|
323
|
+
<td>
|
324
|
+
<pre class="lines">
|
325
|
+
|
326
|
+
|
327
|
+
6
|
328
|
+
7
|
329
|
+
8</pre>
|
330
|
+
</td>
|
331
|
+
<td>
|
332
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 6</span>
|
333
|
+
|
334
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_attribute'>attribute</span>
|
335
|
+
<span class='ivar'>@attribute</span>
|
336
|
+
<span class='kw'>end</span></pre>
|
337
|
+
</td>
|
338
|
+
</tr>
|
339
|
+
</table>
|
340
|
+
</div>
|
341
|
+
|
342
|
+
|
343
|
+
<span id=""></span>
|
344
|
+
<div class="method_details ">
|
345
|
+
<h3 class="signature " id="record-instance_method">
|
346
|
+
|
347
|
+
- (<tt>Object</tt>) <strong>record</strong> <span class="extras">(readonly)</span>
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
</h3><div class="docstring">
|
354
|
+
<div class="discussion">
|
355
|
+
|
356
|
+
<p>Returns the value of attribute record</p>
|
357
|
+
|
358
|
+
|
359
|
+
</div>
|
360
|
+
</div>
|
361
|
+
<div class="tags">
|
362
|
+
|
363
|
+
|
364
|
+
</div><table class="source_code">
|
365
|
+
<tr>
|
366
|
+
<td>
|
367
|
+
<pre class="lines">
|
368
|
+
|
369
|
+
|
370
|
+
7
|
371
|
+
8
|
372
|
+
9</pre>
|
373
|
+
</td>
|
374
|
+
<td>
|
375
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 7</span>
|
376
|
+
|
377
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_record'>record</span>
|
378
|
+
<span class='ivar'>@record</span>
|
379
|
+
<span class='kw'>end</span></pre>
|
380
|
+
</td>
|
381
|
+
</tr>
|
382
|
+
</table>
|
383
|
+
</div>
|
384
|
+
|
385
|
+
|
386
|
+
<span id="value=-instance_method"></span>
|
387
|
+
<div class="method_details ">
|
388
|
+
<h3 class="signature " id="value-instance_method">
|
389
|
+
|
390
|
+
- (<tt>Object</tt>) <strong>value</strong>
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
</h3><div class="docstring">
|
397
|
+
<div class="discussion">
|
398
|
+
|
399
|
+
<p>Returns the value of attribute value</p>
|
400
|
+
|
401
|
+
|
402
|
+
</div>
|
403
|
+
</div>
|
404
|
+
<div class="tags">
|
405
|
+
|
406
|
+
<p class="tag_title">Returns:</p>
|
407
|
+
<ul class="return">
|
408
|
+
|
409
|
+
<li>
|
410
|
+
|
411
|
+
|
412
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
—
|
417
|
+
<div class='inline'>
|
418
|
+
<p>the current value of value</p>
|
419
|
+
</div>
|
420
|
+
|
421
|
+
</li>
|
422
|
+
|
423
|
+
</ul>
|
424
|
+
|
425
|
+
</div><table class="source_code">
|
426
|
+
<tr>
|
427
|
+
<td>
|
428
|
+
<pre class="lines">
|
429
|
+
|
430
|
+
|
431
|
+
6
|
432
|
+
7
|
433
|
+
8</pre>
|
434
|
+
</td>
|
435
|
+
<td>
|
436
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 6</span>
|
437
|
+
|
438
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
439
|
+
<span class='ivar'>@value</span>
|
440
|
+
<span class='kw'>end</span></pre>
|
441
|
+
</td>
|
442
|
+
</tr>
|
443
|
+
</table>
|
444
|
+
</div>
|
445
|
+
|
446
|
+
</div>
|
447
|
+
|
448
|
+
|
449
|
+
<div id="instance_method_details" class="method_details_list">
|
450
|
+
<h2>Instance Method Details</h2>
|
451
|
+
|
452
|
+
|
453
|
+
<div class="method_details first">
|
454
|
+
<h3 class="signature first" id="failure_message_for_should-instance_method">
|
455
|
+
|
456
|
+
- (<tt>Object</tt>) <strong>failure_message_for_should</strong>
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
</h3><table class="source_code">
|
463
|
+
<tr>
|
464
|
+
<td>
|
465
|
+
<pre class="lines">
|
466
|
+
|
467
|
+
|
468
|
+
18
|
469
|
+
19
|
470
|
+
20</pre>
|
471
|
+
</td>
|
472
|
+
<td>
|
473
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 18</span>
|
474
|
+
|
475
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure_message_for_should'>failure_message_for_should</span>
|
476
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbrace'>}</span><span class='tstring_content'> to be persisted and retain its value of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> but the value was </span><span class='embexpr_beg'>#{</span><span class='ivar'>@final_value</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>"</span></span>
|
477
|
+
<span class='kw'>end</span></pre>
|
478
|
+
</td>
|
479
|
+
</tr>
|
480
|
+
</table>
|
481
|
+
</div>
|
482
|
+
|
483
|
+
<div class="method_details ">
|
484
|
+
<h3 class="signature " id="failure_message_for_should_not-instance_method">
|
485
|
+
|
486
|
+
- (<tt>Object</tt>) <strong>failure_message_for_should_not</strong>
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
</h3><table class="source_code">
|
493
|
+
<tr>
|
494
|
+
<td>
|
495
|
+
<pre class="lines">
|
496
|
+
|
497
|
+
|
498
|
+
22
|
499
|
+
23
|
500
|
+
24</pre>
|
501
|
+
</td>
|
502
|
+
<td>
|
503
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 22</span>
|
504
|
+
|
505
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_failure_message_for_should_not'>failure_message_for_should_not</span>
|
506
|
+
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbrace'>}</span><span class='tstring_content'> not to be persisted and retain its value of </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'> but it did.</span><span class='tstring_end'>"</span></span>
|
507
|
+
<span class='kw'>end</span></pre>
|
508
|
+
</td>
|
509
|
+
</tr>
|
510
|
+
</table>
|
511
|
+
</div>
|
512
|
+
|
513
|
+
<div class="method_details ">
|
514
|
+
<h3 class="signature " id="matches?-instance_method">
|
515
|
+
|
516
|
+
- (<tt>Boolean</tt>) <strong>matches?</strong>(record)
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
</h3><div class="docstring">
|
523
|
+
<div class="discussion">
|
524
|
+
|
525
|
+
|
526
|
+
</div>
|
527
|
+
</div>
|
528
|
+
<div class="tags">
|
529
|
+
|
530
|
+
<p class="tag_title">Returns:</p>
|
531
|
+
<ul class="return">
|
532
|
+
|
533
|
+
<li>
|
534
|
+
|
535
|
+
|
536
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
</li>
|
541
|
+
|
542
|
+
</ul>
|
543
|
+
|
544
|
+
</div><table class="source_code">
|
545
|
+
<tr>
|
546
|
+
<td>
|
547
|
+
<pre class="lines">
|
548
|
+
|
549
|
+
|
550
|
+
9
|
551
|
+
10
|
552
|
+
11
|
553
|
+
12
|
554
|
+
13
|
555
|
+
14
|
556
|
+
15
|
557
|
+
16</pre>
|
558
|
+
</td>
|
559
|
+
<td>
|
560
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/persist.rb', line 9</span>
|
561
|
+
|
562
|
+
<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>
|
563
|
+
<span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:#{</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
564
|
+
<span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_save!'>save!</span>
|
565
|
+
<span class='id identifier rubyid_record'>record</span> <span class='op'>=</span> <span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
566
|
+
<span class='ivar'>@final_value</span> <span class='op'>=</span> <span class='id identifier rubyid_record'>record</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='id identifier rubyid_attribute'>attribute</span><span class='rparen'>)</span>
|
567
|
+
|
568
|
+
<span class='ivar'>@final_value</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span>
|
569
|
+
<span class='kw'>end</span></pre>
|
570
|
+
</td>
|
571
|
+
</tr>
|
572
|
+
</table>
|
573
|
+
</div>
|
574
|
+
|
575
|
+
</div>
|
576
|
+
|
577
|
+
</div>
|
578
|
+
|
579
|
+
<div id="footer">
|
580
|
+
Generated on Wed Sep 19 15:04:27 2012 by
|
581
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
582
|
+
0.8.2.1 (ruby-1.9.3).
|
583
|
+
</div>
|
584
|
+
|
585
|
+
</body>
|
586
|
+
</html>
|