snipt

Ctrl+h for KB shortcuts
#65815

Markdown

Choosing Test Fixture Names

Page 86 of Agile Web Development with Rails 4

But what do we do with fixtures that can’t easily get a self-explanatory name like valid_order_for_fred? Pick natural names that you have an easier time associating to a role. For example, instead of using order1, use christmas_order. Instead of customer1, use fred. Once you get into the habit of natural names, you’ll soon be weaving a nice little story about how fred is paying for his christmas_order with his invalid_credit_card first, then paying with his valid_credit_card, and finally choosing to ship it all off to aunt_mary.

https://snipt.net/embed/cb2adf9c28f4b9c34d1ea90eba2d0aff/
https://snipt.net/raw/cb2adf9c28f4b9c34d1ea90eba2d0aff/
cb2adf9c28f4b9c34d1ea90eba2d0aff
markdown
Markdown
2
2014-04-16T10:20:40
True
True
Jun 27, 2013 at 02:46 AM
/api/public/snipt/65815/
choosing-test-fixture-names
<p>Page 86 of Agile Web Development with Rails 4</p> <blockquote> <p>But what do we do with fixtures that can’t easily get a self-explanatory name like <code>valid_order_for_fred</code>? Pick natural names that you have an easier time associating to a role. For example, instead of using <code>order1</code>, use <code>christmas_order</code>. Instead of <code>customer1</code>, use fred. Once you get into the habit of natural names, you’ll soon be weaving a nice little story about how <code>fred</code> is paying for his <code>christmas_order</code> with his <code>invalid_credit_card</code> first, then paying with his <code>valid_credit_card</code>, and finally choosing to ship it all off to <code>aunt_mary</code>.</p> </blockquote>
fixtures, quote, rails, test
#54412

Text only

Chrome Extension Test

Testing out the Chrome Extension. Seems to work pretty goodly.
https://snipt.net/embed/8bc8c217ca36683eb29d7e0aae1ef125/
https://snipt.net/raw/8bc8c217ca36683eb29d7e0aae1ef125/
8bc8c217ca36683eb29d7e0aae1ef125
text
Text only
1
2014-04-18T13:02:37
True
True
Jan 24, 2013 at 01:59 PM
/api/public/snipt/54412/
chrome-extension-test
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>Testing out the Chrome Extension. Seems to work pretty goodly. </span></pre></div> </td></tr></table>
#46171

Text only

Douglas Crockford, "JavaScript, the Good Parts"

1
2
3
"Fortunately, JavaScript has some extaordinarily good parts. In JavaScript,
there is a beautiful, elegant, highly expressive language that is buries under
a steaming pile of good intentions and blunders."
https://snipt.net/embed/3433f0521718d0097f42120301f531d4/
https://snipt.net/raw/3433f0521718d0097f42120301f531d4/
3433f0521718d0097f42120301f531d4
text
Text only
3
2014-04-13T05:33:27
True
True
Aug 23, 2012 at 11:55 AM
/api/public/snipt/46171/
douglas-crockford-javascript-the-good-parts
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>&quot;Fortunately, JavaScript has some extaordinarily good parts. In JavaScript, </span><span id="L-2"><a name="L-2"></a>there is a beautiful, elegant, highly expressive language that is buries under </span><span id="L-3"><a name="L-3"></a>a steaming pile of good intentions and blunders.&quot; </span></pre></div> </td></tr></table>
JavaScript, quotes