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,241 @@
|
|
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::Helpers::Capybara
|
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 (C)</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="../Helpers.html" title="ElabsMatchers::Helpers (module)">Helpers</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Capybara</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::Helpers::Capybara
|
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/helpers/capybara.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="#select_year_and_month-instance_method" title="#select_year_and_month (instance method)">- (Object) <strong>select_year_and_month</strong>(year, month, options = {}) </a>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
</span>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<span class="summary_desc"><div class='inline'>
|
112
|
+
<p>Selects a year and a month on a rails date select input field.</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="select_year_and_month-instance_method">
|
129
|
+
|
130
|
+
- (<tt>Object</tt>) <strong>select_year_and_month</strong>(year, month, options = {})
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</p><div class="docstring">
|
135
|
+
<div class="discussion">
|
136
|
+
|
137
|
+
<p>Selects a year and a month on a rails date select input field.</p>
|
138
|
+
|
139
|
+
<p>Example: select_year_and_month("2010", "March", :from => "Birth date")</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'>year</span>
|
151
|
+
|
152
|
+
|
153
|
+
<span class='type'>(<tt>String</tt>)</span>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
—
|
158
|
+
<div class='inline'>
|
159
|
+
<p>The name of the year used in the select input field</p>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
<li>
|
165
|
+
|
166
|
+
<span class='name'>month</span>
|
167
|
+
|
168
|
+
|
169
|
+
<span class='type'>(<tt>String</tt>)</span>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
—
|
174
|
+
<div class='inline'>
|
175
|
+
<p>The name of the month used in the select input field</p>
|
176
|
+
</div>
|
177
|
+
|
178
|
+
</li>
|
179
|
+
|
180
|
+
<li>
|
181
|
+
|
182
|
+
<span class='name'>options</span>
|
183
|
+
|
184
|
+
|
185
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
186
|
+
|
187
|
+
|
188
|
+
<em class="default">(defaults to: <tt>{}</tt>)</em>
|
189
|
+
|
190
|
+
|
191
|
+
—
|
192
|
+
<div class='inline'>
|
193
|
+
<p>The label of the select field</p>
|
194
|
+
</div>
|
195
|
+
|
196
|
+
</li>
|
197
|
+
|
198
|
+
</ul>
|
199
|
+
|
200
|
+
|
201
|
+
</div><table class="source_code">
|
202
|
+
<tr>
|
203
|
+
<td>
|
204
|
+
<pre class="lines">
|
205
|
+
|
206
|
+
|
207
|
+
15
|
208
|
+
16
|
209
|
+
17
|
210
|
+
18
|
211
|
+
19
|
212
|
+
20
|
213
|
+
21</pre>
|
214
|
+
</td>
|
215
|
+
<td>
|
216
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/helpers/capybara.rb', line 15</span>
|
217
|
+
|
218
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_select_year_and_month'>select_year_and_month</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='comma'>,</span> <span class='id identifier rubyid_month'>month</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
219
|
+
<span class='id identifier rubyid_year_field'>year_field</span> <span class='op'>=</span> <span class='id identifier rubyid_find_field'>find_field</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:from</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
220
|
+
<span class='id identifier rubyid_month_field'>month_field</span> <span class='op'>=</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='symbol'>:id</span><span class='comma'>,</span> <span class='id identifier rubyid_year_field'>year_field</span><span class='lbracket'>[</span><span class='symbol'>:id</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>_1i$</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>_2i</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
221
|
+
|
222
|
+
<span class='id identifier rubyid_year_field'>year_field</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_year'>year</span><span class='rparen'>)</span>
|
223
|
+
<span class='id identifier rubyid_month_field'>month_field</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_month'>month</span><span class='rparen'>)</span>
|
224
|
+
<span class='kw'>end</span></pre>
|
225
|
+
</td>
|
226
|
+
</tr>
|
227
|
+
</table>
|
228
|
+
</div>
|
229
|
+
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</div>
|
233
|
+
|
234
|
+
<div id="footer">
|
235
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
236
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
237
|
+
0.7.5 (ruby-1.9.3).
|
238
|
+
</div>
|
239
|
+
|
240
|
+
</body>
|
241
|
+
</html>
|
@@ -0,0 +1,213 @@
|
|
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::Helpers::Common
|
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 (C)</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="../Helpers.html" title="ElabsMatchers::Helpers (module)">Helpers</a></span></span>
|
38
|
+
»
|
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::Helpers::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/helpers/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="#normalize_keys-instance_method" title="#normalize_keys (instance method)">- (Object) <strong>normalize_keys</strong>(hash) </a>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
</span>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<span class="summary_desc"><div class='inline'>
|
112
|
+
<p>Normalizes a hash so that it can be described in a more human friendly
|
113
|
+
manner.</p>
|
114
|
+
</div></span>
|
115
|
+
|
116
|
+
</li>
|
117
|
+
|
118
|
+
|
119
|
+
</ul>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
<div id="instance_method_details" class="method_details_list">
|
125
|
+
<h2>Instance Method Details</h2>
|
126
|
+
|
127
|
+
|
128
|
+
<div class="method_details first">
|
129
|
+
<p class="signature first" id="normalize_keys-instance_method">
|
130
|
+
|
131
|
+
- (<tt>Object</tt>) <strong>normalize_keys</strong>(hash)
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
</p><div class="docstring">
|
136
|
+
<div class="discussion">
|
137
|
+
|
138
|
+
<p>Normalizes a hash so that it can be described in a more human friendly
|
139
|
+
manner.</p>
|
140
|
+
|
141
|
+
<p>Examples: normalize_keys({ "First name" => "Adam" }) =>
|
142
|
+
HashWithIndifferentAccess.new({ "first_name" => "adam" })</p>
|
143
|
+
|
144
|
+
<p># Or in a Cucumber table: Given the following people:</p>
|
145
|
+
|
146
|
+
<pre class="code ruby"><code>| First name | Last name |
|
147
|
+
| Douglas | Adams |</code></pre>
|
148
|
+
|
149
|
+
|
150
|
+
</div>
|
151
|
+
</div>
|
152
|
+
<div class="tags">
|
153
|
+
<h3>Parameters:</h3>
|
154
|
+
<ul class="param">
|
155
|
+
|
156
|
+
<li>
|
157
|
+
|
158
|
+
<span class='name'>options</span>
|
159
|
+
|
160
|
+
|
161
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
—
|
166
|
+
<div class='inline'>
|
167
|
+
<p>A hash of human-friendly key and value pairs.</p>
|
168
|
+
</div>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
</ul>
|
173
|
+
|
174
|
+
|
175
|
+
</div><table class="source_code">
|
176
|
+
<tr>
|
177
|
+
<td>
|
178
|
+
<pre class="lines">
|
179
|
+
|
180
|
+
|
181
|
+
21
|
182
|
+
22
|
183
|
+
23
|
184
|
+
24
|
185
|
+
25
|
186
|
+
26</pre>
|
187
|
+
</td>
|
188
|
+
<td>
|
189
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/helpers/common.rb', line 21</span>
|
190
|
+
|
191
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_normalize_keys'>normalize_keys</span><span class='lparen'>(</span><span class='id identifier rubyid_hash'>hash</span><span class='rparen'>)</span>
|
192
|
+
<span class='id identifier rubyid_hash'>hash</span><span class='period'>.</span><span class='id identifier rubyid_inject'>inject</span><span class='lparen'>(</span><span class='const'>HashWithIndifferentAccess</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_new_hash'>new_hash</span><span class='comma'>,</span> <span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span><span class='op'>|</span>
|
193
|
+
<span class='id identifier rubyid_new_hash'>new_hash</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>_</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
194
|
+
<span class='id identifier rubyid_new_hash'>new_hash</span>
|
195
|
+
<span class='kw'>end</span>
|
196
|
+
<span class='kw'>end</span></pre>
|
197
|
+
</td>
|
198
|
+
</tr>
|
199
|
+
</table>
|
200
|
+
</div>
|
201
|
+
|
202
|
+
</div>
|
203
|
+
|
204
|
+
</div>
|
205
|
+
|
206
|
+
<div id="footer">
|
207
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
208
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
209
|
+
0.7.5 (ruby-1.9.3).
|
210
|
+
</div>
|
211
|
+
|
212
|
+
</body>
|
213
|
+
</html>
|
@@ -0,0 +1,201 @@
|
|
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::Helpers::Fixtures
|
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 (F)</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="../Helpers.html" title="ElabsMatchers::Helpers (module)">Helpers</a></span></span>
|
38
|
+
»
|
39
|
+
<span class="title">Fixtures</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::Helpers::Fixtures
|
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/helpers/fixtures.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="#fixture_file-instance_method" title="#fixture_file (instance method)">- (Object) <strong>fixture_file</strong>(path) </a>
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
</span>
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
<span class="summary_desc"><div class='inline'>
|
112
|
+
<p>Opens a file from the fixtures directory.</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="fixture_file-instance_method">
|
129
|
+
|
130
|
+
- (<tt>Object</tt>) <strong>fixture_file</strong>(path)
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</p><div class="docstring">
|
135
|
+
<div class="discussion">
|
136
|
+
|
137
|
+
<p>Opens a file from the fixtures directory.</p>
|
138
|
+
|
139
|
+
<p>Example: fixture_file("file.txt")</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'>file</span>
|
151
|
+
|
152
|
+
|
153
|
+
<span class='type'>(<tt>String</tt>)</span>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
—
|
158
|
+
<div class='inline'>
|
159
|
+
<p>name A file name, relative to the fixtures folder.</p>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
</li>
|
163
|
+
|
164
|
+
</ul>
|
165
|
+
|
166
|
+
|
167
|
+
</div><table class="source_code">
|
168
|
+
<tr>
|
169
|
+
<td>
|
170
|
+
<pre class="lines">
|
171
|
+
|
172
|
+
|
173
|
+
15
|
174
|
+
16
|
175
|
+
17
|
176
|
+
18</pre>
|
177
|
+
</td>
|
178
|
+
<td>
|
179
|
+
<pre class="code"><span class="info file"># File 'lib/elabs_matchers/helpers/fixtures.rb', line 15</span>
|
180
|
+
|
181
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_fixture_file'>fixture_file</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
182
|
+
<span class='id identifier rubyid_root'>root</span> <span class='op'>=</span> <span class='kw'>if</span> <span class='kw'>defined?</span><span class='lparen'>(</span><span class='const'>Rails</span><span class='rparen'>)</span> <span class='kw'>then</span> <span class='const'>Rails</span><span class='period'>.</span><span class='id identifier rubyid_root'>root</span> <span class='kw'>else</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>../../../spec/</span><span class='tstring_end'>"</span></span> <span class='kw'>end</span>
|
183
|
+
<span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_root'>root</span><span class='rbrace'>}</span><span class='tstring_content'>/fixtures/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_path'>path</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
184
|
+
<span class='kw'>end</span></pre>
|
185
|
+
</td>
|
186
|
+
</tr>
|
187
|
+
</table>
|
188
|
+
</div>
|
189
|
+
|
190
|
+
</div>
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
<div id="footer">
|
195
|
+
Generated on Fri Feb 17 16:29:16 2012 by
|
196
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
197
|
+
0.7.5 (ruby-1.9.3).
|
198
|
+
</div>
|
199
|
+
|
200
|
+
</body>
|
201
|
+
</html>
|