elabs_matchers 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +38 -34
- data/README.md +103 -0
- data/doc/Cucumber.html +116 -0
- data/doc/ElabsMatchers/Cucumber/Common.html +145 -0
- data/doc/ElabsMatchers/Cucumber.html +108 -0
- data/doc/ElabsMatchers/Helpers/Capybara.html +241 -0
- data/doc/ElabsMatchers/Helpers/Common.html +213 -0
- data/doc/ElabsMatchers/Helpers/Fixtures.html +201 -0
- data/doc/ElabsMatchers/Helpers/Orm.html +289 -0
- data/doc/ElabsMatchers/Helpers/Session.html +497 -0
- data/doc/ElabsMatchers/Helpers.html +110 -0
- data/doc/ElabsMatchers/Matchers/Capybara/Common.html +1159 -0
- data/doc/ElabsMatchers/Matchers/Capybara.html +38 -11
- data/doc/ElabsMatchers/Matchers/Rspec/Allow.html +98 -0
- data/doc/ElabsMatchers/Matchers/Rspec/Common.html +332 -0
- data/doc/ElabsMatchers/Matchers/Rspec/Orm.html +231 -0
- data/doc/ElabsMatchers/Matchers/Rspec.html +41 -12
- data/doc/ElabsMatchers/Matchers.html +30 -13
- data/doc/ElabsMatchers/Orm/Post.html +1041 -0
- data/doc/ElabsMatchers/Orm.html +108 -0
- data/doc/ElabsMatchers.html +31 -15
- data/doc/_index.html +179 -12
- data/doc/class_list.html +21 -10
- data/doc/css/full_list.css +2 -0
- data/doc/css/style.css +19 -15
- data/doc/file.README.html +129 -48
- data/doc/file_list.html +20 -9
- data/doc/frames.html +1 -1
- data/doc/index.html +129 -48
- data/doc/js/app.js +20 -18
- data/doc/js/full_list.js +36 -12
- data/doc/js/jquery.js +3 -3
- data/doc/method_list.html +308 -9
- data/doc/top-level-namespace.html +115 -12
- data/elabs_matchers.gemspec +3 -1
- data/lib/elabs_matchers/cucumber/common.rb +2 -4
- data/lib/elabs_matchers/helpers/common.rb +3 -1
- data/lib/elabs_matchers/helpers/session.rb +61 -6
- data/lib/elabs_matchers/matchers/capybara/common.rb +58 -13
- data/lib/elabs_matchers/matchers/rspec/allow.rb +112 -0
- data/lib/elabs_matchers/orm/post.rb +18 -3
- data/lib/elabs_matchers/version.rb +1 -1
- data/spec/elabs_matchers/helpers/session_spec.rb +35 -0
- data/spec/elabs_matchers/matchers/capybara/common_spec.rb +1 -1
- data/spec/elabs_matchers/matchers/rspec/allow_spec.rb +80 -0
- data/spec/elabs_matchers/matchers/rspec/orm_spec.rb +3 -3
- data/spec/spec_helper.rb +10 -1
- metadata +109 -101
- data/.rvmrc +0 -1
- data/README.rdoc +0 -45
@@ -0,0 +1,231 @@
|
|
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::Orm
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.5
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
16
|
+
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
18
|
+
relpath = '../../..';
|
19
|
+
if (relpath != '') relpath += '/';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/jquery.js"></script>
|
23
|
+
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../../../js/app.js"></script>
|
25
|
+
|
26
|
+
|
27
|
+
</head>
|
28
|
+
<body>
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
31
|
+
</script>
|
32
|
+
|
33
|
+
<div id="header">
|
34
|
+
<div id="menu">
|
35
|
+
|
36
|
+
<a href="../../../_index.html">Index (O)</a> »
|
37
|
+
<span class='title'><span class='object_link'><a href="../../../ElabsMatchers.html" title="ElabsMatchers (module)">ElabsMatchers</a></span></span> » <span class='title'><span class='object_link'><a href="../../Matchers.html" title="ElabsMatchers::Matchers (module)">Matchers</a></span></span> » <span class='title'><span class='object_link'><a href="../Rspec.html" title="ElabsMatchers::Matchers::Rspec (module)">Rspec</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Orm</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::Orm
|
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/orm.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="#persist-instance_method" title="#persist (instance method)">- (Object) <strong>persist</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 an assigned value persistes in the database.</p>
|
113
|
+
</div></span>
|
114
|
+
|
115
|
+
</li>
|
116
|
+
|
117
|
+
|
118
|
+
</ul>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
<div id="instance_method_details" class="method_details_list">
|
124
|
+
<h2>Instance Method Details</h2>
|
125
|
+
|
126
|
+
|
127
|
+
<div class="method_details first">
|
128
|
+
<p class="signature first" id="persist-instance_method">
|
129
|
+
|
130
|
+
- (<tt>Object</tt>) <strong>persist</strong>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</p><div class="docstring">
|
135
|
+
<div class="discussion">
|
136
|
+
|
137
|
+
<p>Asserts if an assigned value persistes in the database.</p>
|
138
|
+
|
139
|
+
<p>Example: post.should persist(:title, "Blog post")</p>
|
140
|
+
|
141
|
+
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
<div class="tags">
|
145
|
+
<h3>Parameters:</h3>
|
146
|
+
<ul class="param">
|
147
|
+
|
148
|
+
<li>
|
149
|
+
|
150
|
+
<span class='name'>attribute</span>
|
151
|
+
|
152
|
+
|
153
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
—
|
158
|
+
<div class='inline'>
|
159
|
+
<p>name The name of the attibute to check if it persisted or not</p>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
<li>
|
165
|
+
|
166
|
+
<span class='name'>value</span>
|
167
|
+
|
168
|
+
|
169
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
—
|
174
|
+
<div class='inline'>
|
175
|
+
<p>The value to persist to the attribute</p>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
</ul>
|
181
|
+
|
182
|
+
|
183
|
+
</div><table class="source_code">
|
184
|
+
<tr>
|
185
|
+
<td>
|
186
|
+
<pre class="lines">
|
187
|
+
|
188
|
+
|
189
|
+
15
|
190
|
+
16
|
191
|
+
17
|
192
|
+
18
|
193
|
+
19
|
194
|
+
20
|
195
|
+
21
|
196
|
+
22
|
197
|
+
23
|
198
|
+
24
|
199
|
+
25</pre>
|
200
|
+
</td>
|
201
|
+
<td>
|
202
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/matchers/rspec/orm.rb', line 15</span>
|
203
|
+
|
204
|
+
<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'>:persist</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_attribute'>attribute</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
205
|
+
<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>
|
206
|
+
<span class='id identifier rubyid_actual'>actual</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>
|
207
|
+
<span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_save!'>save!</span>
|
208
|
+
<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_class'>class</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_actual'>actual</span><span class='period'>.</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
|
209
|
+
<span class='ivar'>@final_value</span> <span class='op'>=</span> <span class='id identifier rubyid_actual'>actual</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>
|
210
|
+
<span class='ivar'>@final_value</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span>
|
211
|
+
<span class='kw'>end</span>
|
212
|
+
<span class='id identifier rubyid_failure_message_for_should'>failure_message_for_should</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_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_end'>"</span></span> <span class='rbrace'>}</span>
|
213
|
+
<span class='id identifier rubyid_failure_message_for_should_not'>failure_message_for_should_not</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_actual'>actual</span><span class='op'>|</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Expected </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_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> <span class='rbrace'>}</span>
|
214
|
+
<span class='kw'>end</span></pre>
|
215
|
+
</td>
|
216
|
+
</tr>
|
217
|
+
</table>
|
218
|
+
</div>
|
219
|
+
|
220
|
+
</div>
|
221
|
+
|
222
|
+
</div>
|
223
|
+
|
224
|
+
<div id="footer">
|
225
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
226
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
227
|
+
0.7.5 (ruby-1.9.3).
|
228
|
+
</div>
|
229
|
+
|
230
|
+
</body>
|
231
|
+
</html>
|
@@ -3,16 +3,26 @@
|
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
|
8
|
-
|
6
|
+
<title>
|
7
|
+
Module: ElabsMatchers::Matchers::Rspec
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.5
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
16
|
|
10
17
|
<script type="text/javascript" charset="utf-8">
|
11
18
|
relpath = '../..';
|
12
19
|
if (relpath != '') relpath += '/';
|
13
20
|
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../../js/
|
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
|
+
|
16
26
|
|
17
27
|
</head>
|
18
28
|
<body>
|
@@ -33,11 +43,14 @@
|
|
33
43
|
</div>
|
34
44
|
|
35
45
|
<div id="search">
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
|
39
53
|
</div>
|
40
|
-
|
41
54
|
<div class="clear"></div>
|
42
55
|
</div>
|
43
56
|
|
@@ -59,11 +72,27 @@
|
|
59
72
|
|
60
73
|
|
61
74
|
<dt class="r1 last">Defined in:</dt>
|
62
|
-
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/
|
75
|
+
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/orm.rb<span class="defines">,<br />
|
76
|
+
lib/elabs_matchers/matchers/rspec/allow.rb,<br /> lib/elabs_matchers/matchers/rspec/common.rb</span>
|
77
|
+
</dd>
|
63
78
|
|
64
79
|
</dl>
|
65
80
|
<div class="clear"></div>
|
66
81
|
|
82
|
+
<h2>Defined Under Namespace</h2>
|
83
|
+
<p class="children">
|
84
|
+
|
85
|
+
|
86
|
+
<strong class="modules">Modules:</strong> <span class='object_link'><a href="Rspec/Allow.html" title="ElabsMatchers::Matchers::Rspec::Allow (module)">Allow</a></span>, <span class='object_link'><a href="Rspec/Common.html" title="ElabsMatchers::Matchers::Rspec::Common (module)">Common</a></span>, <span class='object_link'><a href="Rspec/Orm.html" title="ElabsMatchers::Matchers::Rspec::Orm (module)">Orm</a></span>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
</p>
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
67
96
|
|
68
97
|
|
69
98
|
|
@@ -72,9 +101,9 @@
|
|
72
101
|
</div>
|
73
102
|
|
74
103
|
<div id="footer">
|
75
|
-
Generated on
|
104
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
76
105
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
77
|
-
0.
|
106
|
+
0.7.5 (ruby-1.9.3).
|
78
107
|
</div>
|
79
108
|
|
80
109
|
</body>
|
@@ -3,16 +3,26 @@
|
|
3
3
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
4
4
|
<head>
|
5
5
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
|
-
<title>
|
7
|
-
|
8
|
-
|
6
|
+
<title>
|
7
|
+
Module: ElabsMatchers::Matchers
|
8
|
+
|
9
|
+
— Documentation by YARD 0.7.5
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
16
|
|
10
17
|
<script type="text/javascript" charset="utf-8">
|
11
18
|
relpath = '..';
|
12
19
|
if (relpath != '') relpath += '/';
|
13
20
|
</script>
|
14
|
-
|
15
|
-
<script type="text/javascript" charset="utf-8" src="../js/
|
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
|
+
|
16
26
|
|
17
27
|
</head>
|
18
28
|
<body>
|
@@ -33,11 +43,14 @@
|
|
33
43
|
</div>
|
34
44
|
|
35
45
|
<div id="search">
|
36
|
-
|
37
|
-
|
38
|
-
|
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
|
+
|
39
53
|
</div>
|
40
|
-
|
41
54
|
<div class="clear"></div>
|
42
55
|
</div>
|
43
56
|
|
@@ -59,8 +72,8 @@
|
|
59
72
|
|
60
73
|
|
61
74
|
<dt class="r1 last">Defined in:</dt>
|
62
|
-
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/
|
63
|
-
lib/elabs_matchers/matchers/capybara/common.rb</span>
|
75
|
+
<dd class="r1 last">lib/elabs_matchers/matchers/rspec/orm.rb<span class="defines">,<br />
|
76
|
+
lib/elabs_matchers/matchers/rspec/allow.rb,<br /> lib/elabs_matchers/matchers/rspec/common.rb,<br /> lib/elabs_matchers/matchers/capybara/common.rb</span>
|
64
77
|
</dd>
|
65
78
|
|
66
79
|
</dl>
|
@@ -81,12 +94,16 @@
|
|
81
94
|
|
82
95
|
|
83
96
|
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
|
84
101
|
</div>
|
85
102
|
|
86
103
|
<div id="footer">
|
87
|
-
Generated on
|
104
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
88
105
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
89
|
-
0.
|
106
|
+
0.7.5 (ruby-1.9.3).
|
90
107
|
</div>
|
91
108
|
|
92
109
|
</body>
|